84% root-category-recent-posts

Code Review | Root Category Recent Posts

WordPress plugin Root Category Recent Posts scored84%from 54 tests.

About plugin

  • Plugin page: root-category-rec...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 7
  • Update frequency: every 163.6 days
  • Top authors: LordPretender (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,147 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
Install script ran successfully

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

Analyzing server-side resources used by Root Category Recent Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.42 ▼6.20
Dashboard /wp-admin3.34 ▲0.0445.63 ▼4.24
Posts /wp-admin/edit.php3.39 ▲0.0349.34 ▼0.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.46 ▼8.32
Media Library /wp-admin/upload.php3.26 ▲0.0336.15 ▲2.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_rcrp_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Root Category Recent Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.22 ▼1.421.97 ▲0.3640.29 ▲0.70
Dashboard /wp-admin2,206 ▲184.81 ▼1.08109.94 ▼0.8339.73 ▼1.26
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0240.05 ▲1.0935.31 ▼3.29
Add New Post /wp-admin/post-new.php1,514 ▼1923.47 ▲0.31613.18 ▼78.8652.43 ▼0.47
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.04102.27 ▼9.0542.53 ▼6.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_rcrp_widget
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/root-category-recent-posts/root-category-recent-posts.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
4 plugin tags: last posts, widget, root category, recent posts

root-category-recent-posts/root-category-recent-posts.php 92% from 13 tests

The main PHP file in "Root Category Recent Posts" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 158 characters long)

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
Good job! No executable or dangerous file extensions detected125 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1285097
PO File1183728

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected