84% hura-custom-cursors

Code Review | Hura Custom Cursors

WordPress plugin Hura Custom Cursors scored84%from 54 tests.

About plugin

  • Plugin page: hura-custom-cursors
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2021
  • Latest release: Aug 18, 2023
  • Number of updates: 6
  • Update frequency: every 126.5 days
  • Top authors: huynhmaianhkiet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,398 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.02MB] [CPU: ▼2.29ms] Passed 4 tests

Server-side resources used by Hura Custom Cursors
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.19 ▼4.75
Dashboard /wp-admin3.33 ▲0.0345.42 ▲0.12
Posts /wp-admin/edit.php3.38 ▲0.0247.54 ▼1.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.88 ▼1.64
Media Library /wp-admin/upload.php3.25 ▲0.0233.92 ▼1.14
Custom Cursors /wp-admin/themes.php?page=hura-apps-custom-cursors-panel3.2232.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Hura Custom Cursors
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.441.70 ▲0.0641.20 ▼1.26
Dashboard /wp-admin2,207 ▲195.84 ▲0.9598.37 ▼41.0942.40 ▼6.48
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0540.88 ▲5.4833.63 ▲0.20
Add New Post /wp-admin/post-new.php1,536 ▲222.99 ▼0.12639.11 ▲44.2159.73 ▲11.60
Media Library /wp-admin/upload.php1,392 ▲74.18 ▼0.1197.17 ▼2.8343.79 ▲1.15
Custom Cursors /wp-admin/themes.php?page=hura-apps-custom-cursors-panel1,9061.7625.97167.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hura-custom-cursors/HuraApps-Custom-Cursors.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

hura-custom-cursors/HuraApps-Custom-Cursors.php 92% from 13 tests

"Hura Custom Cursors" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hura-custom-cursors.php" instead of "HuraApps-Custom-Cursors.php")

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
No dangerous file extensions were detected131 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP177131

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
100 PNG files occupy 0.43MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cursors/hura-75.png1.68KB1.52KB▼ 9.92%
images/cursors/hura-41.png2.57KB1.64KB▼ 36.01%
images/cursors/hura-57.png2.04KB1.62KB▼ 20.58%
images/cursors/hura-60.png2.30KB1.57KB▼ 31.81%
images/cursors/hura-53.png2.25KB1.55KB▼ 31.05%