78% nifty-related-posts

Code Review | Nifty Related Posts

WordPress plugin Nifty Related Posts scored78%from 54 tests.

About plugin

  • Plugin page: nifty-related-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Oct 1, 2014
  • Latest release: Oct 1, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: cardiganmedia (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Nifty Related Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0821.64 ▼14.37
Dashboard /wp-admin3.31 ▲0.0143.32 ▼2.83
Posts /wp-admin/edit.php3.36 ▲0.0144.06 ▼4.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.16 ▼12.37
Media Library /wp-admin/upload.php3.24 ▲0.0132.29 ▼2.67
Nifty Related Posts /wp-admin/options-general.php?page=niftyrp3.1830.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nifty Related Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.37 ▲0.021.93 ▲0.2638.69 ▼2.37
Dashboard /wp-admin2,199 ▲225.49 ▼0.0585.40 ▲0.5938.10 ▼3.51
Posts /wp-admin/edit.php2,107 ▲71.96 ▲0.0239.13 ▲1.1835.64 ▼1.65
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▼0.10595.05 ▼68.6348.95 ▼13.09
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.0394.64 ▼21.5442.54 ▼5.27
Nifty Related Posts /wp-admin/options-general.php?page=niftyrp9642.1826.0227.29

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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 errors were triggered by the plugin
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=niftyrp
    • > Notice in wp-content/plugins/nifty-related-posts/load-nifty.php+77
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nifty-related-posts/load-nifty.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
4 plugin tags: category, related content, posts, related posts

nifty-related-posts/load-nifty.php 77% from 13 tests

The entry point to "Nifty Related Posts" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 231 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nifty-related-posts.php" instead of "load-nifty.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected208 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1630197
CSS11811

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions7
▷ Named functions7100.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