84% nirror

Code Review | Nirror

WordPress plugin Nirror scored 84% from 54 tests.

About plugin

  • Plugin page: nirror
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.8
  • WordPress version: 6.3.1
  • First release: Apr 4, 2014
  • Latest release: Apr 4, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Nirror (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 917 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: ▼3.90ms] Passed 4 tests

This is a short check of server-side resources used by Nirror
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.56 ▼7.18
Dashboard /wp-admin3.32 ▲0.0245.74 ▼5.77
Posts /wp-admin/edit.php3.37 ▲0.0149.38 ▲4.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.94 ▼4.22
Media Library /wp-admin/upload.php3.24 ▲0.0134.01 ▲1.57
Nirror /wp-admin/options-general.php?page=nirror3.2130.12

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
nirror_site_id
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Nirror
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7613.23 ▼1.022.39 ▲0.2141.25 ▼1.56
Dashboard /wp-admin2,207 ▲225.83 ▼0.07100.53 ▼12.6139.06 ▼7.60
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0639.78 ▲4.6434.47 ▲0.04
Add New Post /wp-admin/post-new.php1,536 ▼223.30 ▲0.02640.80 ▲46.9260.79 ▼2.18
Media Library /wp-admin/upload.php1,392 ▲14.26 ▲0.05100.54 ▲0.8443.75 ▼0.27
Nirror /wp-admin/options-general.php?page=nirror7912.0322.6126.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nirror/nirror.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/nirror/options.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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Modified settings panel with Nirror.), #2 (Nirror settings page.)
You can look at the official readme.txt

nirror/nirror.php Passed 13 tests

The entry point to "Nirror" version 0.0.1 is a PHP file that has certain tags in its header comment area
28 characters long description:
Enables Nirror on all pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected77 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP220877

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.99KB3.39KB▼ 51.45%
screenshot-1.png27.36KB9.75KB▼ 64.37%