84% gp-related-posts

Code Review | GP Related Posts

WordPress plugin GP Related Posts scored 84% from 54 tests.

About plugin

  • Plugin page: gp-related-posts
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Jun 11, 2020
  • Number of updates: 12
  • Update frequency: every 34.6 days
  • Top authors: westcoastdigital (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 2,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.72ms] Passed 4 tests

An overview of server-side resources used by GP Related Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.81 ▼2.69
Dashboard /wp-admin3.31 ▲0.0144.75 ▼4.34
Posts /wp-admin/edit.php3.36 ▲0.0150.87 ▲5.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.24 ▼14.50
Media Library /wp-admin/upload.php3.23 ▲0.0131.80 ▼1.36

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

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

Browser metrics Passed 4 tests

Checking browser requirements for GP Related Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.071.62 ▼0.5537.25 ▼6.50
Dashboard /wp-admin2,209 ▲214.87 ▼1.03114.63 ▲7.9943.20 ▲0.95
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0435.59 ▲2.2733.13 ▼2.23
Add New Post /wp-admin/post-new.php1,514 ▼1923.32 ▲0.15669.77 ▼6.1751.04 ▲0.95
Media Library /wp-admin/upload.php1,385 ▼04.25 ▼0.1191.26 ▼10.2639.51 ▼8.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 is_admin() in wp-content/plugins/gp-related-posts/inc/related-post-settings.php:317

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: generatepress

gp-related-posts/gp-related-posts.php 85% from 13 tests

The principal PHP file in "GP Related Posts" v. 1.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • 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 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin648 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP38411526
JavaScript110046
CSS14040
Markdown114036

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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 were not PNG files found in your plugin