79% nusprite

Code Review | Nusprite

WordPress plugin Nusprite scored79%from 54 tests.

About plugin

  • Plugin page: nusprite
  • Plugin version: 0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.5-5.7.1
  • WordPress version: 6.3.1
  • First release: May 15, 2021
  • Latest release: May 15, 2021
  • Number of updates: 5
  • Update frequency: every 110.2 days
  • Top authors: nuw40 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.08ms] Passed 4 tests

Analyzing server-side resources used by Nusprite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.97 ▼5.06
Dashboard /wp-admin3.47 ▲0.1650.92 ▼2.48
Posts /wp-admin/edit.php3.58 ▲0.2253.38 ▲3.78
Add New Post /wp-admin/post-new.php6.05 ▲0.1694.27 ▼4.57
Media Library /wp-admin/upload.php3.39 ▲0.1643.60 ▲5.44
Documentation /wp-admin/admin.php?page=nusprite-documentation3.3637.39
Space on disk /wp-admin/admin.php?page=nusprite-space-on-disk3.3833.93
Uninstall /wp-admin/admin.php?page=nusprite-uninstall3.3636.19
Troubleshooting /wp-admin/admin.php?page=nusprite-troubleshooting3.3532.96
Create a sprite image /wp-admin/admin.php?page=nusprite-create-sprite3.3639.24
Sprites /wp-admin/admin.php?page=nusprite3.3632.89

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 24 new files
Database: 3 new tables, 8 new options
New tables
wp_nusprite_items
wp_nusprite_sprites
wp_nusprite_versions
New WordPress options
nusprite_db_version
widget_theysaidso_widget
can_compress_scripts
nusprite_plugin_version
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Nusprite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲6714.25 ▼0.311.67 ▼0.3144.38 ▼0.20
Dashboard /wp-admin2,259 ▲825.63 ▼0.0696.36 ▲1.5240.28 ▲0.62
Posts /wp-admin/edit.php2,164 ▲642.04 ▲0.1039.58 ▲0.8437.30 ▼0.81
Add New Post /wp-admin/post-new.php1,562 ▲3423.19 ▲0.04689.38 ▲2.3651.05 ▼4.18
Media Library /wp-admin/upload.php1,464 ▲614.21 ▼0.08111.02 ▲5.8646.75 ▼2.62
Documentation /wp-admin/admin.php?page=nusprite-documentation9942.1229.6233.27
Space on disk /wp-admin/admin.php?page=nusprite-space-on-disk8912.0125.9541.75
Uninstall /wp-admin/admin.php?page=nusprite-uninstall8382.0324.3528.85
Troubleshooting /wp-admin/admin.php?page=nusprite-troubleshooting8292.0325.2327.24
Create a sprite image /wp-admin/admin.php?page=nusprite-create-sprite8372.0426.0925.82
Sprites /wp-admin/admin.php?page=nusprite8451.9927.8626.30

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nusprite/nusprite.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nusprite/classes/class-nusprite-admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: sprite

nusprite/nusprite.php Passed 13 tests

"Nusprite" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
20 characters long description:
Sprite CSS generator

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,878 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP17285741,611
PO File17597183
CSS13084

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.88
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods72
▷ Static methods4663.89%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin