74% wp-all-post-type-widget

Code Review | WP All Post Type Widget

WordPress plugin WP All Post Type Widget scored74%from 54 tests.

About plugin

  • Plugin page: wp-all-post-type-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.2.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2017
  • Latest release: Sep 28, 2019
  • Number of updates: 14
  • Update frequency: every 57.2 days
  • Top authors: amairatech (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /972 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.84ms] Passed 4 tests

This is a short check of server-side resources used by WP All Post Type Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.92 ▲0.87
Dashboard /wp-admin3.38 ▲0.0850.05 ▲1.04
Posts /wp-admin/edit.php3.50 ▲0.1448.60 ▼5.97
Add New Post /wp-admin/post-new.php5.98 ▲0.1098.81 ▲0.72
Media Library /wp-admin/upload.php3.31 ▲0.0837.71 ▲1.98

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_wpaptw-all-post-type-widget-posts
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP All Post Type Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.18 ▼1.121.76 ▲0.0744.35 ▼0.57
Dashboard /wp-admin2,202 ▲145.79 ▼0.07101.48 ▼12.7235.78 ▼8.39
Posts /wp-admin/edit.php2,091 ▲22.02 ▲0.0135.36 ▼7.7332.27 ▼11.79
Add New Post /wp-admin/post-new.php1,533 ▼023.26 ▼0.11595.71 ▼95.9152.01 ▲1.79
Media Library /wp-admin/upload.php1,393 ▲144.29 ▲0.0898.86 ▲0.5446.58 ▼0.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-all-post-type-widget/wp-all-post-type-widget.php+37
    Non-static method WPAPTW_Deactivator::deactivate() should not be called statically
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_wpaptw-all-post-type-widget-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-all-post-type-widget/classes/class-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: wp all post type widget, custom post type widget, custom taxonomy post, wordpress all post type widget

wp-all-post-type-widget/wp-all-post-type-widget.php Passed 13 tests

The entry point to "WP All Post Type Widget" version 1.0.4 is a PHP file that has certain tags in its header comment area
59 characters long description:
Display post type and his category base post in your widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin340 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP888111313
CSS10018
JavaScript1009

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.83
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2076.92%
▷ Protected methods00.00%
▷ Private methods623.08%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin