84% advance-category-posts-widget

Code Review | Advance Category Posts Widget

WordPress plugin Advance Category Posts Widget scored84%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: 6.3.1
  • 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

40+ active /898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.59ms] Passed 4 tests

Analyzing server-side resources used by Advance Category Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1038.85 ▲2.74
Dashboard /wp-admin3.40 ▲0.1046.63 ▼1.69
Posts /wp-admin/edit.php3.45 ▲0.0945.75 ▼1.41
Add New Post /wp-admin/post-new.php6.00 ▲0.1184.06 ▼7.73
Media Library /wp-admin/upload.php3.32 ▲0.0935.48 ▲0.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Advance Category Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16914.05 ▼0.336.46 ▲4.3743.13 ▲0.07
Dashboard /wp-admin2,210 ▲254.89 ▼0.95103.24 ▲3.2141.67 ▲5.10
Posts /wp-admin/edit.php2,093 ▲252.03 ▼0.0334.43 ▼4.1936.15 ▲2.03
Add New Post /wp-admin/post-new.php1,518 ▼2423.46 ▲5.15661.53 ▲40.0369.59 ▲11.68
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0296.72 ▼4.5742.38 ▼4.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_acpw_posts_category_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: post duration, category, post list, post time, 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
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advance-category-posts-widget.php" instead of "advance-posts-category-show.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin580 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP33368480
CSS312079
JavaScript21021

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems 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
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ 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%