84% related-categories-post

Code Review | related categories post

WordPress plugin related categories post scored84%from 54 tests.

About plugin

  • Plugin page: related-categorie...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2020
  • Latest release: Jan 27, 2020
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: mehtashail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /394 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.30ms] Passed 4 tests

This is a short check of server-side resources used by related categories post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.14 ▼6.71
Dashboard /wp-admin3.33 ▲0.0350.31 ▼2.74
Posts /wp-admin/edit.php3.38 ▲0.0246.75 ▼10.42
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.36 ▼25.31
Media Library /wp-admin/upload.php3.25 ▲0.0240.60 ▲6.22

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_related_category_widget

Browser metrics Passed 4 tests

Checking browser requirements for related categories post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.24 ▼0.021.74 ▼0.2045.01 ▼2.85
Dashboard /wp-admin2,197 ▲175.51 ▼0.1586.22 ▼1.8740.95 ▼4.33
Posts /wp-admin/edit.php2,102 ▲52.03 ▼0.0034.66 ▼5.1435.15 ▲1.26
Add New Post /wp-admin/post-new.php1,528 ▲223.14 ▲0.10681.06 ▲55.1259.02 ▼2.93
Media Library /wp-admin/upload.php1,405 ▲54.22 ▲0.07108.50 ▲5.8947.67 ▲4.42

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_related_category_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/related-categories-post/related-categories-post.php:33

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 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt is a good inspiration

related-categories-post/related-categories-post.php 92% from 13 tests

The main PHP script in "related categories post" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151688
CSS10120

PHP code Passed 2 tests

Analyzing 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.19
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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 images were found in this plugin