10% related-posts-list-grid-and-slider-all-in-one

Code Review | wordpress related Posts with thumbnails

WordPress plugin wordpress related Posts with thumbnails scored10%from 54 tests.

About plugin

  • Plugin page: related-posts-lis...
  • Plugin version: 3.0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.3
  • WordPress version: 6.3.1
  • First release: Apr 15, 2012
  • Latest release: Aug 8, 2015
  • Number of updates: 94
  • Update frequency: every 12.9 days
  • Top authors: ashrafweb (91.49%)wp-buy (9.57%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /26,807 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php+9
    Trying to get property 'ID' of non-object

Server metrics [RAM: ▼1.84MB] [CPU: ▼54.07ms] Passed 4 tests

Server-side resources used by wordpress related Posts with thumbnails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.03 ▼37.14
Dashboard /wp-admin2.16 ▼1.146.59 ▼41.03
Posts /wp-admin/edit.php2.17 ▼1.195.79 ▼43.96
Add New Post /wp-admin/post-new.php2.16 ▼3.726.63 ▼94.13
Media Library /wp-admin/upload.php2.17 ▼1.067.46 ▼25.09
Related Posts with Thumbnails (lite) /wp-admin/options-general.php?page=aio_options_cp2.175.85

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 160 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

wordpress related Posts with thumbnails: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.21 ▼0.161.88 ▲0.3342.59 ▲5.19
Dashboard /wp-admin2,190 ▲165.51 ▼0.0684.41 ▼0.5037.90 ▼7.56
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0133.92 ▼5.6433.71 ▼2.01
Add New Post /wp-admin/post-new.php1,540 ▲1418.29 ▼4.85704.21 ▲71.1069.95 ▲16.39
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.0795.84 ▲1.2743.78 ▲4.76
Related Posts with Thumbnails (lite) /wp-admin/options-general.php?page=aio_options_cp2,1692.5256.63114.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php+9
    Trying to get property 'ID' of non-object
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php+9
    Trying to get property 'ID' of non-object
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php+22
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php+21
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php+22
    Trying to get property 'count' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/related.php+261
    Undefined variable: default_thumb
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/related.php+211
    Undefined index: aio_thumbw
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/related.php+211
    Undefined index: aio_thumbh
    • > GET request to /wp-admin/options-general.php?page=aio_options_cp
    • > Notice in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/admin-core.php+5
    Undefined index: action

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 take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-posts-list-grid-and-slider-all-in-one/the_globals.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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:
  • Screenshots: These screenshots require images: #1 (How to install the plugin), #2 (activating the plugin), #3 (Final result (related posts as a grid)), #4 (Final result (related posts as a list))
The official readme.txt might help

related-posts-list-grid-and-slider-all-in-one/related.php 85% from 13 tests

The main PHP file in "wordpress related Posts with thumbnails" ver. 3.0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("related-posts-list-grid-and-slider-all-in-one.php" instead of "related.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 202 characters long)

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
Success! There were no dangerous files found in this plugin41,946 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
SVG210028,352
CSS5374510,504
JavaScript153021541,521
PHP6513791,486
HTML15083

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
65 PNG files occupy 1.03MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flat-ui/images/login/icon.png7.33KB3.18KB▼ 56.59%
flat-ui/images/video/pause.png1.06KB0.25KB▼ 76.24%
images/thumbnailwh.png1.29KB1.30KB0.00%
images/rlist2.png23.13KB10.73KB▼ 53.61%
flat-ui/images/video/play.png1.15KB0.51KB▼ 55.57%