94% ngg-simple-history

Code Review | NextCellent Simple History

WordPress plugin NextCellent Simple History scored 94% from 54 tests.

About plugin

  • Plugin page: ngg-simple-history
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.5
  • WordPress version: 5.8.1
  • First release: Jan 31, 2015
  • Latest release: Apr 1, 2016
  • Number of updates: 22
  • Update frequency: every 19.4 days
  • Top authors: niknetniko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,010 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by NextCellent Simple History
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0232.31 ▼1.15
Dashboard /wp-admin3.08 ▲0.0251.47 ▲4.74
Posts /wp-admin/edit.php3.13 ▲0.0245.46 ▲2.44
Add New Post /wp-admin/post-new.php5.43 ▲0.0091.43 ▼569.46
Media Library /wp-admin/upload.php3.02 ▲0.0231.67 ▼3.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by NextCellent Simple History
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11115.74 ▲0.148.07 ▲0.2443.80 ▼11.21
Dashboard /wp-admin2,971 ▲405.86 ▼0.10133.87 ▼9.63114.68 ▼3.91
Posts /wp-admin/edit.php2,743 ▲42.69 ▲0.0161.59 ▼4.9784.90 ▼4.31
Add New Post /wp-admin/post-new.php1,618 ▼5222.00 ▲2.75264.76 ▼89.96108.30 ▲3.40
Media Library /wp-admin/upload.php1,752 ▼555.01 ▼0.00158.19 ▼0.94122.75 ▼0.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ngg-simple-history/ngg-simple-history.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/ngg-simple-history/ngg-simple-history.php on line 28
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/ngg-simple-history/ngg-simple-history.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/ngg-simple-history/loggers/NextCellentLogger.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

ngg-simple-history/ngg-simple-history.php Passed 13 tests

The main file in "NextCellent Simple History" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
44 characters long description:
Adds NextCellent support for Simple History.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,358 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File37581,4581,013
PHP792107345

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin