68% newer-not-better

Code Review | Newer Not Better

WordPress plugin Newer Not Better scored68%from 54 tests.

About plugin

  • Plugin page: newer-not-better
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.4-5.8
  • WordPress version: 6.3.1
  • First release: Oct 26, 2021
  • Latest release: Oct 26, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: adam.ainsworth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.98MB] [CPU: ▼34.40ms] Passed 4 tests

An overview of server-side resources used by Newer Not Better
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0526.87 ▼13.65
Dashboard /wp-admin2.97 ▼0.3318.77 ▼34.02
Posts /wp-admin/edit.php2.97 ▼0.3917.30 ▼25.19
Add New Post /wp-admin/post-new.php2.97 ▼2.9219.49 ▼62.21
Media Library /wp-admin/upload.php2.97 ▼0.2618.32 ▼16.19
Newer Not Better /wp-admin/options-general.php?page=newer_not_better2.9718.94

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Newer Not Better
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.33 ▼1.071.64 ▼0.1640.55 ▼5.19
Dashboard /wp-admin2,210 ▲214.89 ▼1.00111.08 ▼11.9039.42 ▼7.13
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0235.72 ▼3.5533.54 ▼2.92
Add New Post /wp-admin/post-new.php1,536 ▲323.23 ▼0.09658.29 ▲45.8051.40 ▲6.01
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0895.62 ▼3.9140.44 ▼3.23
Newer Not Better /wp-admin/options-general.php?page=newer_not_better7982.0222.4624.85

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
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/newer-not-better/newer-not-better.php+84
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=newer_not_better
    • > Notice in wp-content/plugins/newer-not-better/newer-not-better.php+173
    Trying to access array offset on value of type bool

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/newer-not-better/newer-not-better.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The Newer Not Better options screen in 1.0.0)
You can look at the official readme.txt

newer-not-better/newer-not-better.php 92% from 13 tests

The main file in "Newer Not Better" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • 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 review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected120 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23132120

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods1292.31%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png37.15KB12.93KB▼ 65.20%