78% widget-recent-posts-with-category-choice

Code Review | Recent Posts Widget Advanced

WordPress plugin Recent Posts Widget Advanced scored78%from 54 tests.

About plugin

  • Plugin page: widget-recent-pos...
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 28, 2017
  • Latest release: Oct 3, 2023
  • Number of updates: 53
  • Update frequency: every 39.7 days
  • Top authors: kgmservizi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /8,812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.85ms] Passed 4 tests

A check of server-side resources used by Recent Posts Widget Advanced
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.71 ▼4.24
Dashboard /wp-admin3.34 ▲0.0047.28 ▼8.53
Posts /wp-admin/edit.php3.46 ▲0.1046.33 ▲3.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.13 ▼13.52
Media Library /wp-admin/upload.php3.27 ▲0.0434.68 ▼1.12
Recent Post Widget /wp-admin/tools.php?page=kgmarp3.2530.36

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_widget-recent-posts-in-category

Browser metrics Passed 4 tests

Checking browser requirements for Recent Posts Widget Advanced
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.29 ▼0.081.98 ▼0.0737.88 ▼7.56
Dashboard /wp-admin2,199 ▲255.61 ▼0.1183.26 ▼1.6538.71 ▲2.07
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0333.78 ▼5.4335.40 ▼0.83
Add New Post /wp-admin/post-new.php1,529 ▲323.02 ▲0.01675.30 ▲75.0152.79 ▼0.24
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0097.29 ▲4.4940.10 ▼2.08
Recent Post Widget /wp-admin/tools.php?page=kgmarp7892.0323.8427.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php
    • > /wp-content/plugins/widget-recent-posts-with-category-choice/includes/frontend.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php on line 12
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php on line 19
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php on line 43
    • > PHP Notice
      Trying to get property 'posts' of non-object in wp-content/plugins/widget-recent-posts-with-category-choice/includes/frontend.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php on line 43
    • > PHP Notice
      Trying to get property 'posts' of non-object in wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php on line 19
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/widget-recent-posts-with-category-choice/includes/frontend.php on line 13
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/widget-recent-posts-with-category-choice/templates/frontend-1.php on line 14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/widget-recent-posts-with-category-choice/includes/frontend.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/widget-recent-posts-with-category-choice/includes/frontend.php on line 11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% 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
1 plugin tags: widget

widget-recent-posts-with-category-choice/recent-post-category.php 92% from 13 tests

This is the main PHP file of "Recent Posts Widget Advanced" version 1.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-recent-posts-with-category-choice.php" instead of "recent-post-category.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected411 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1178108411

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.35
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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