10% vertical-related-posts

Code Review | Vertical Related Posts

WordPress plugin Vertical Related Posts scored10%from 54 tests.

About plugin

  • Plugin page: vertical-related-...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Dec 9, 2015
  • Number of updates: 36
  • Update frequency: every 14.7 days
  • Top authors: corneliucirlan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,157 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/vertical-related-posts/vertical-related-posts.php+59
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.77ms] Passed 4 tests

Server-side resources used by Vertical Related Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1232.27 ▼7.99
Dashboard /wp-admin3.43 ▲0.1344.86 ▼0.62
Posts /wp-admin/edit.php3.54 ▲0.1945.53 ▲3.61
Add New Post /wp-admin/post-new.php6.01 ▲0.1380.92 ▼6.09
Media Library /wp-admin/upload.php3.35 ▲0.1336.85 ▲4.30
Vertical Related Posts /wp-admin/options-general.php?page=vertical-related-posts-options3.3029.60

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
cc_vrp_activate_flag
db_upgraded
can_compress_scripts
cc_vrp_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Vertical Related Posts: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.18 ▼1.211.50 ▼0.2042.00 ▼4.22
Dashboard /wp-admin2,211 ▲264.92 ▼0.02112.07 ▲5.5039.26 ▲0.23
Posts /wp-admin/edit.php2,094 ▲22.03 ▲0.0237.28 ▼8.5733.53 ▼3.91
Add New Post /wp-admin/post-new.php6,415 ▲4,90126.02 ▲8.53910.88 ▲303.0265.81 ▲10.05
Media Library /wp-admin/upload.php1,399 ▲114.22 ▲0.0199.61 ▼4.5042.24 ▼0.30
Vertical Related Posts /wp-admin/options-general.php?page=vertical-related-posts-options1,2841.7325.7933.43

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
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=vertical-related-posts-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=vertical-related-posts-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/vertical-related-posts/vertical-related-posts.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

vertical-related-posts/vertical-related-posts.php Passed 13 tests

The main file in "Vertical Related Posts" v. 1.2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
46 characters long description:
Wordpress plugin for displaying related posts.

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
No dangerous file extensions were detected678 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5115193573
CSS27395
JavaScript11210

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity29.00
▷ Minimum class complexity25.00
▷ Maximum class complexity37.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2882.35%
▷ Protected methods00.00%
▷ Private methods617.65%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants10
▷ Global constants10100.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