78% mouse-cursor-customizer

Code Review | Mouse cursor customizer

WordPress plugin Mouse cursor customizer scored78%from 54 tests.

About plugin

  • Plugin page: mouse-cursor-cust...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2019
  • Latest release: Sep 22, 2020
  • Number of updates: 8
  • Update frequency: every 43.1 days
  • Top authors: alexanderkoledov (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /14,713 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Mouse cursor customizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0228.63 ▼15.91
Dashboard /wp-admin3.38 ▲0.0748.55 ▼0.03
Posts /wp-admin/edit.php3.43 ▲0.0747.52 ▼4.36
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.00 ▲5.28
Media Library /wp-admin/upload.php3.30 ▲0.0737.18 ▲1.74
Cursor Settings /wp-admin/themes.php?page=cursor-settings3.1226.47

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Mouse cursor customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲19613.61 ▼0.776.50 ▲4.8147.17 ▲8.32
Dashboard /wp-admin2,210 ▲225.85 ▲0.95103.02 ▼9.5839.54 ▼4.26
Posts /wp-admin/edit.php2,096 ▲42.06 ▲0.0739.91 ▼4.0134.53 ▼2.39
Add New Post /wp-admin/post-new.php1,536 ▼622.89 ▲4.52578.53 ▼24.6257.29 ▼0.82
Media Library /wp-admin/upload.php1,386 ▲14.24 ▲0.0596.42 ▼6.8241.54 ▼1.99
Cursor Settings /wp-admin/themes.php?page=cursor-settings9171.9731.8033.37

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/themes.php?page=cursor-settings
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
    • > GET request to /wp-admin/themes.php?page=cursor-settings
    • > Notice in wp-content/plugins/mouse-cursor-customizer/cursor-customizer.php+342
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/themes.php?page=cursor-settings
    • > Notice in wp-content/plugins/mouse-cursor-customizer/cursor-customizer.php+388
    Undefined index: use_url_link

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mouse-cursor-customizer/cursor-customizer.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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 require attention:
  • Screenshots: These screenshots do not have images: #1 (Here will be a description for screenshot 1.png), #2 (Here will be a description for screenshot 2.png)
The official readme.txt might help

mouse-cursor-customizer/cursor-customizer.php 92% from 13 tests

The main PHP script in "Mouse cursor customizer" version 1.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("mouse-cursor-customizer.php" instead of "cursor-customizer.php")

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 detected605 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP211138306
CSS24720224
JavaScript225675

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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