84% related-posts-mwip

Code Review | Related post Mwip

WordPress plugin Related post Mwip scored 84% from 54 tests.

About plugin

  • Plugin page: related-posts-mwip
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.8-4.5
  • WordPress version: 6.3.1
  • First release: Nov 21, 2015
  • Latest release: Jul 26, 2016
  • Number of updates: 34
  • Update frequency: every 7.4 days
  • Top authors: simo90 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,144 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.02MB] [CPU: ▼3.12ms] Passed 4 tests

Analyzing server-side resources used by Related post Mwip
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.16 ▼0.16
Dashboard /wp-admin3.32 ▲0.0244.86 ▼8.74
Posts /wp-admin/edit.php3.37 ▲0.0149.26 ▲1.59
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.89 ▲1.31
Media Library /wp-admin/upload.php3.24 ▲0.0130.46 ▼4.87
Related Posts Mwip /wp-admin/options-general.php?page=functions3.2629.52

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 12 new options
New WordPress options
mwip_color_related
theysaidso_admin_options
widget_recent-comments
mwip_related_post_true
mwip_border_related
can_compress_scripts
widget_recent-posts
mwip_title_related
db_upgraded
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Related post Mwip
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.70 ▼0.911.69 ▼0.0145.29 ▲2.67
Dashboard /wp-admin2,234 ▲465.08 ▼0.80108.41 ▲3.2138.97 ▼0.25
Posts /wp-admin/edit.php2,119 ▲272.32 ▲0.2741.95 ▲1.9633.86 ▼3.23
Add New Post /wp-admin/post-new.php6,539 ▲5,02520.51 ▲2.94904.83 ▲217.4640.27 ▼12.92
Media Library /wp-admin/upload.php1,413 ▲254.44 ▲0.16104.87 ▼0.6944.36 ▼1.09
Related Posts Mwip /wp-admin/options-general.php?page=functions1,0812.2344.4826.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • theysaidso_admin_options
    • mwip_title_font_size
    • widget_theysaidso_widget
    • mwip_related_post_true
    • mwip_border_related
    • mwip_title_related
    • widget_recent-comments
    • mwip_color_related
    • can_compress_scripts
    • mwip_border_true
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related-posts-mwip/Related_Posts_Wp.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/related-posts-mwip/Posts_Related_Edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_single() in wp-content/plugins/related-posts-mwip/Template_Related_Posts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/related-posts-mwip/Setting_Related_Posts.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #3 (An example of results) image required
You can look at the official readme.txt

related-posts-mwip/Related_Posts_Wp.php 92% from 13 tests

The principal PHP file in "Related post Mwip" v. 2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("related-posts-mwip.php" instead of "Related_Posts_Wp.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
Success! There were no dangerous files found in this plugin316 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP412227279
CSS216134
JavaScript1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin