78% nerd-wp

Code Review | NERD WP Plugin

WordPress plugin NERD WP Plugin scored78%from 54 tests.

About plugin

  • Plugin page: nerd-wp
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6.35+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-5.8
  • WordPress version: 6.3.1
  • First release: Aug 15, 2018
  • Latest release: Sep 14, 2021
  • Number of updates: 22
  • Update frequency: every 51.2 days
  • Top authors: yoannspace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.33MB] [CPU: ▼21.80ms] Passed 4 tests

Server-side resources used by NERD WP Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4054.06 ▲12.03
Dashboard /wp-admin3.70 ▲0.3547.54 ▼16.76
Posts /wp-admin/edit.php3.75 ▲0.3945.64 ▼2.79
Add New Post /wp-admin/post-new.php3.51 ▼2.3836.38 ▼70.66
Media Library /wp-admin/upload.php3.56 ▲0.3337.36 ▲3.00
NERD /wp-admin/options-general.php?page=nerd-wp3.5332.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for NERD WP Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.54 ▼1.046.02 ▲4.2641.06 ▲2.76
Dashboard /wp-admin2,215 ▲274.82 ▼0.09101.76 ▼6.8138.67 ▼4.95
Posts /wp-admin/edit.php2,095 ▲32.03 ▼0.0136.89 ▲2.3532.81 ▼3.00
Add New Post /wp-admin/post-new.php1,685 ▲14122.58 ▲4.29591.98 ▼16.6863.20 ▲9.06
Media Library /wp-admin/upload.php1,391 ▼04.29 ▲0.1097.73 ▼4.3441.68 ▼4.31
NERD /wp-admin/options-general.php?page=nerd-wp8352.0622.8528.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_nerd_wp_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nerd-wp/tests/bootstrap.php
  • 45× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/nerd-wp/admin/partials/nerd-wp-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Psr7/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/nerd-wp/libraries/guzzle/Psr/Http/Message/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Psr7/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Promise/Promise.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Promise/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Psr7/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/nerd-wp/libraries/guzzle/GuzzleHttp/Exception/TransferException.php:4

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

nerd-wp/nerd-wp.php 85% from 13 tests

This is the main PHP file of "NERD WP Plugin" version 1.2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 225 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin10,060 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP1021,8565,7219,467
JavaScript33818229
Bourne Shell12111120
Markdown2350114
YAML17058
CSS25246
XML24226

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.99
▷ Minimum class complexity1.00
▷ Maximum class complexity230.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces8
Interfaces14
Traits2
Classes74
▷ Abstract classes00.00%
▷ Concrete classes74100.00%
▷ Final classes79.46%
Methods704
▷ Static methods638.95%
▷ Public methods58282.67%
▷ Protected methods101.42%
▷ Private methods11215.91%
Functions144
▷ Named functions5638.89%
▷ Anonymous functions8861.11%
Constants52
▷ Global constants11.92%
▷ Class constants5198.08%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected