84% case-study-ninja

Code Review | Case Study Ninja

WordPress plugin Case Study Ninja scored84%from 54 tests.

About plugin

  • Plugin page: case-study-ninja
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Sep 27, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: larabrook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.01ms] Passed 4 tests

An overview of server-side resources used by Case Study Ninja
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.55 ▼8.02
Dashboard /wp-admin3.36 ▲0.0645.85 ▼0.80
Posts /wp-admin/edit.php3.41 ▲0.0548.61 ▼0.23
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.66 ▲4.78
Media Library /wp-admin/upload.php3.29 ▲0.0533.26 ▼2.97
Case Study Ninja /wp-admin/tools.php?page=case-study-ninja-menu3.2530.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 11 new options
New WordPress options
csn-cs-total
csn-cs-row
csn-cs-directoryListing
csn-cs-css
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
csn-cs-support
widget_recent-posts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Case Study Ninja: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.96 ▼0.786.46 ▲4.2775.36 ▲29.21
Dashboard /wp-admin2,207 ▲195.84 ▲0.92101.04 ▼9.2038.59 ▼1.75
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0239.67 ▼0.7934.78 ▼0.70
Add New Post /wp-admin/post-new.php1,540 ▲618.53 ▼4.55614.58 ▼42.1151.48 ▼4.49
Media Library /wp-admin/upload.php1,395 ▲44.17 ▼0.0594.25 ▼3.7543.60 ▲1.23
Case Study Ninja /wp-admin/tools.php?page=case-study-ninja-menu9022.0722.7229.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/case-study-ninja/caseStudyNinja.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

case-study-ninja/caseStudyNinja.php 92% from 13 tests

The primary PHP file in "Case Study Ninja" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("case-study-ninja.php" instead of "caseStudyNinja.php")

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
Success! There were no dangerous files found in this plugin414 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP213393381
JavaScript18433

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions10
▷ Named functions10100.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
img/Ninja-Icon-greyblue.png42.97KB20.48KB▼ 52.33%