72% wp-custom-cursors

Code Review | WP Custom Cursors | WordPress Cursor Plugin

WordPress plugin WP Custom Cursors | WordPress Cursor Plugin scored72%from 54 tests.

About plugin

  • Plugin page: wp-custom-cursors
  • Plugin version: 3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2021
  • Latest release: Jul 10, 2023
  • Number of updates: 45
  • Update frequency: every 30.0 days
  • Top authors: hrs2015 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

6,000+ active /30,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.27ms] Passed 4 tests

This is a short check of server-side resources used by WP Custom Cursors | WordPress Cursor Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.92 ▲6.45
Dashboard /wp-admin3.47 ▲0.1248.12 ▼11.02
Posts /wp-admin/edit.php3.58 ▲0.2244.94 ▼4.17
Add New Post /wp-admin/post-new.php6.05 ▲0.1684.10 ▼6.94
Media Library /wp-admin/upload.php3.39 ▲0.1635.47 ▲5.05
Add New Cursor /wp-admin/admin.php?page=wpcc_add_new3.7338.30
Tutorials /wp-admin/admin.php?page=wpcc_tuts3.3632.43
Custom Cursor /wp-admin/admin.php?page=wp_custom_cursors3.3641.08
Cursor Maker /wp-admin/admin.php?page=wpcc_cursor_maker3.8633.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 81 new files
Database: 2 new tables, 6 new options
New tables
wp_created_cursors
wp_added_cursors
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WP Custom Cursors | WordPress Cursor Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.33 ▼1.056.19 ▲4.4643.64 ▲4.21
Dashboard /wp-admin2,286 ▲974.88 ▼0.02104.10 ▼16.4938.95 ▼9.13
Posts /wp-admin/edit.php2,172 ▲832.03 ▼0.0335.87 ▼4.6931.78 ▼3.21
Add New Post /wp-admin/post-new.php1,561 ▲4223.13 ▼0.01667.73 ▲57.2659.37 ▲4.35
Media Library /wp-admin/upload.php1,469 ▲814.29 ▲0.1097.56 ▲0.4941.65 ▼2.39
Add New Cursor /wp-admin/admin.php?page=wpcc_add_new3,7464.9678.84129.83
Tutorials /wp-admin/admin.php?page=wpcc_tuts1,5149.37275.6862.12
Custom Cursor /wp-admin/admin.php?page=wp_custom_cursors1,1542.0223.9135.11
Cursor Maker /wp-admin/admin.php?page=wpcc_cursor_maker6,1625.25102.1968.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpcc_cursor_maker
    • > Notice in wp-content/plugins/wp-custom-cursors/admin/partials/wp-custom-cursors-cursor-maker.php+917
    Undefined variable: cursor_options_value

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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-custom-cursors/admin/partials/wp-custom-cursors-add-new.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-custom-cursors/wp-custom-cursors.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-custom-cursors/admin/partials/wp-custom-cursors-tuts.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-custom-cursors/admin/partials/wp-custom-cursors-activation.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-custom-cursors/admin/partials/wp-custom-cursors-cursor-maker.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-custom-cursors/admin/partials/wp-custom-cursors-header.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=wpcc_tuts
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=wpcc_tuts 175 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #4 (Plugin Options), #5 (Plugin Options), #6 (Plugin Options), #7 (Plugin Options), #8 (Plugin Options), #9 (Plugin Options), #10 (Plugin Options)
You can take inspiration from this readme.txt

wp-custom-cursors/wp-custom-cursors.php 92% from 13 tests

The main file in "WP Custom Cursors | WordPress Cursor Plugin" v. 3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin30,857 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
SVG3544018,575
CSS5941434,268
PHP154353482,311
LESS14102,305
Sass220102,222
JavaScript81891161,175
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.71
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin