68% posts-by-type-access

Code Review | Posts by Type Access

WordPress plugin Posts by Type Access scored68%from 54 tests.

About plugin

  • Plugin page: posts-by-type-access
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2012
  • Latest release: Apr 17, 2023
  • Number of updates: 63
  • Update frequency: every 65.4 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,341 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼34.70ms] Passed 4 tests

Analyzing server-side resources used by Posts by Type Access
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.43 ▼8.60
Dashboard /wp-admin2.99 ▼0.3119.52 ▼29.70
Posts /wp-admin/edit.php3.00 ▼0.3623.10 ▼21.00
Add New Post /wp-admin/post-new.php3.00 ▼2.8921.05 ▼79.51
Media Library /wp-admin/upload.php3.00 ▼0.2325.05 ▼5.95
Scheduled (0) /wp-admin/edit.php?post_type=wp_navigation&post_status=future3.0019.41
Published (0) /wp-admin/edit.php?post_type=attachment&post_status=publish3.0020.84
Drafts (0) /wp-admin/edit.php?post_type=wp_navigation&post_status=draft3.0018.72
Published (1) /wp-admin/edit.php?post_type=post&post_status=publish3.0022.40
Published (0) /wp-admin/edit.php?post_type=wp_block&post_status=publish3.0021.95
Drafts (1) /wp-admin/edit.php?post_type=page&post_status=draft3.0022.67
Scheduled (0) /wp-admin/edit.php?post_type=post&post_status=future3.0021.75
Drafts (0) /wp-admin/edit.php?post_type=attachment&post_status=draft3.0019.33
Drafts (0) /wp-admin/edit.php?post_type=post&post_status=draft3.0023.01
Published (1) /wp-admin/edit.php?post_type=page&post_status=publish3.0019.59

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
posts_by_type_access
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Posts by Type Access
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.75 ▼0.891.72 ▼0.0938.11 ▼4.99
Dashboard /wp-admin2,237 ▲495.85 ▲0.96110.80 ▲5.7146.72 ▲2.44
Posts /wp-admin/edit.php2,120 ▲312.05 ▲0.0438.77 ▼2.3136.37 ▼0.67
Add New Post /wp-admin/post-new.php1,567 ▲2523.25 ▲5.00631.46 ▼9.2252.58 ▼15.72
Media Library /wp-admin/upload.php1,413 ▲224.20 ▲0.00101.24 ▲3.2142.37 ▼1.91
Scheduled (0) /wp-admin/edit.php?post_type=wp_navigation&post_status=future1,0772.0039.8430.38
Published (0) /wp-admin/edit.php?post_type=attachment&post_status=publish1,4194.1890.5540.61
Drafts (0) /wp-admin/edit.php?post_type=wp_navigation&post_status=draft1,0771.9929.1926.65
Published (1) /wp-admin/edit.php?post_type=post&post_status=publish2,1172.0234.5531.71
Published (0) /wp-admin/edit.php?post_type=wp_block&post_status=publish1,1466.58139.0632.49
Drafts (1) /wp-admin/edit.php?post_type=page&post_status=draft1,8342.0033.6932.18
Scheduled (0) /wp-admin/edit.php?post_type=post&post_status=future1,2581.9530.8028.39
Drafts (0) /wp-admin/edit.php?post_type=attachment&post_status=draft1,4194.0680.2033.21
Drafts (0) /wp-admin/edit.php?post_type=post&post_status=draft1,2581.9329.9429.55
Published (1) /wp-admin/edit.php?post_type=page&post_status=publish1,8802.0532.9430.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/posts-by-type-access/posts-by-type-access.php+49
    Undefined index: square
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=page&post_status=publish
    • > Notice in wp-content/plugins/posts-by-type-access/posts-by-type-access.php+49
    Undefined index: square

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-by-type-access/posts-by-type-access.php:243

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: categories, posts, admin

posts-by-type-access/posts-by-type-access.php Passed 13 tests

The primary PHP file in "Posts by Type Access" version 2.3 is used by WordPress to initiate all plugin functionality
140 characters long description:
Adds a link to drafts, posted, scheduled items and categories under the posts, pages, and other custom post type sections in the admin menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected249 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25519183
PO File1222566

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin