84% ninjadb

Code Review | NinjaDB

WordPress plugin NinjaDB scored84%from 54 tests.

About plugin

  • Plugin page: ninjadb
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Sep 26, 2017
  • Number of updates: 4
  • Update frequency: every 4.3 days
  • Top authors: techjewel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.55ms] Passed 4 tests

Server-side resources used by NinjaDB
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0042.58 ▼0.41
Dashboard /wp-admin8.16 ▲0.01833,367.90 ▲7,743.96
Posts /wp-admin/edit.php3.40 ▲0.0054.35 ▼2.66
Add New Post /wp-admin/post-new.php5.93 ▲0.0097.69 ▼3.93
Media Library /wp-admin/upload.php3.27 ▲0.0038.42 ▲0.78

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by NinjaDB
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.111.76 ▼0.5145.33 ▲1.26
Dashboard /wp-admin2,198 ▲185.63 ▼0.0283.73 ▼9.6439.20 ▼3.19
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0439.98 ▲1.6337.62 ▼1.44
Add New Post /wp-admin/post-new.php1,526 ▼223.41 ▲0.36647.54 ▼1.1156.02 ▼1.61
Media Library /wp-admin/upload.php1,403 ▲94.21 ▼0.0294.76 ▼10.0941.66 ▼2.91

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait 'NinjaDB\\ModelTrait' not found in wp-content/plugins/ninjadb/src/BaseModel.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires php: Version format is invalid
You can look at the official readme.txt

ninjadb/ninjadb.php Passed 13 tests

The main file in "NinjaDB" v. 0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
Query Builder Database Wrapper for WordPress, Build for developers by developers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected400 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP572248400

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity25.50
▷ Minimum class complexity12.00
▷ Maximum class complexity39.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
No PNG files were detected