84% advance-category-posts-widget

Code Review | Advance Category Posts Widget

WordPress plugin Advance Category Posts Widget scored 84% from 54 tests.

About plugin

  • Plugin page: advance-category-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.4
  • WordPress version: 5.9.2
  • First release: Aug 14, 2018
  • Latest release: Apr 24, 2019
  • Number of updates: 17
  • Update frequency: every 15.0 days
  • Top authors: saurav.rox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 576 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼294.20ms] Passed 4 tests

Analyzing server-side resources used by Advance Category Posts Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1353.26 ▲3.66
Dashboard /wp-admin3.51 ▲0.1135.26 ▲2.56
Posts /wp-admin/edit.php3.74 ▲0.1038.33 ▼2.40
Add New Post /wp-admin/post-new.php6.99 ▲0.0295.96 ▼1,169.89
Media Library /wp-admin/upload.php3.39 ▲0.0923.07 ▼7.07

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Advance Category Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,881 ▲12716.75 ▲0.779.26 ▲2.772.12 ▼0.57
Dashboard /wp-admin2,897 ▲396.05 ▼0.20116.72 ▼18.37155.13 ▼7.69
Posts /wp-admin/edit.php2,699 ▲113.24 ▲0.0262.59 ▼3.09137.03 ▼6.55
Add New Post /wp-admin/post-new.php1,672 ▼8619.09 ▼2.30395.35 ▼70.79153.50 ▼7.43
Media Library /wp-admin/upload.php1,700 ▼15.55 ▲0.07152.60 ▲4.14191.57 ▼2.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_acpw_posts_category_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_image_size() in wp-content/plugins/advance-category-posts-widget/assets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-category-posts-widget/init.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: post list, post, time, post slider, post category...

advance-category-posts-widget/advance-posts-category-show.php 85% from 13 tests

The main PHP file in "Advance Category Posts Widget" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advance-category-posts-widget.php" instead of "advance-posts-category-show.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin580 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity33.50
▷ Minimum class complexity4.00
▷ Maximum class complexity63.00
Average method complexity8.88
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions150.00%
▷ Anonymous functions150.00%
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/image/no-featured-img.png4.16KB1.39KB▼ 66.51%