90% unagi

Code Review | Unagi

WordPress plugin Unagi scored90%from 54 tests.

About plugin

  • Plugin page: unagi
  • Plugin version: 0.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 4, 2021
  • Latest release: Jul 21, 2023
  • Number of updates: 9
  • Update frequency: every 96.7 days
  • Top authors: handyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.75ms] Passed 4 tests

An overview of server-side resources used by Unagi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.79 ▼4.32
Dashboard /wp-admin3.35 ▲0.0045.78 ▼14.48
Posts /wp-admin/edit.php3.40 ▲0.0448.54 ▲1.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.33 ▼10.04
Media Library /wp-admin/upload.php3.27 ▲0.0435.31 ▼2.16
Notifications /wp-admin/index.php?page=notification3.2330.25

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Unagi
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.081.90 ▲0.1940.37 ▼0.43
Dashboard /wp-admin2,204 ▲165.80 ▼0.09100.03 ▼1.0338.36 ▼5.46
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0239.15 ▲3.2434.81 ▼1.47
Add New Post /wp-admin/post-new.php1,517 ▼217.51 ▼5.52593.69 ▼68.2047.54 ▼3.82
Media Library /wp-admin/upload.php1,389 ▼24.21 ▲0.0892.32 ▼14.1842.51 ▼5.38
Notifications /wp-admin/index.php?page=notification7622.0225.7125.23

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 96% from 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
3 plugin tags: admin notice, notification, nags

unagi/plugin.php 92% from 13 tests

The primary PHP file in "Unagi" version 0.1.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("unagi.php" instead of "plugin.php")

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
There were no executable files found in this plugin218 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP773149203
CSS11103215
JavaScript2020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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
Namespaces6
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%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.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
PNG images were not found in this plugin