68% beautify-cursor

Code Review | Beautify Cursor

WordPress plugin Beautify Cursor scored68%from 54 tests.

About plugin

  • Plugin page: beautify-cursor
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 4, 2018
  • Latest release: Aug 5, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mmaumio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /2,880 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼37.72ms] Passed 4 tests

Analyzing server-side resources used by Beautify Cursor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0629.40 ▼11.70
Dashboard /wp-admin3.07 ▼0.2825.97 ▼43.73
Posts /wp-admin/edit.php3.07 ▼0.2929.25 ▼21.39
Add New Post /wp-admin/post-new.php3.07 ▼2.8227.05 ▼73.10
Media Library /wp-admin/upload.php3.07 ▼0.1624.93 ▼12.65
Cursor Options /wp-admin/options-general.php?page=cursor-options3.0725.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 91 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Beautify Cursor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲17414.83 ▲0.402.00 ▼0.1452.63 ▲8.77
Dashboard /wp-admin2,364 ▲1906.45 ▲0.84120.25 ▲30.4342.96 ▲3.30
Posts /wp-admin/edit.php2,292 ▲1923.57 ▲1.5656.99 ▲21.2635.69 ▼1.26
Add New Post /wp-admin/post-new.php1,708 ▲17622.81 ▼0.34591.81 ▼63.5836.09 ▼22.87
Media Library /wp-admin/upload.php1,420 ▲204.45 ▲0.2382.87 ▼26.8342.86 ▼5.09
Cursor Options /wp-admin/options-general.php?page=cursor-options1,6493.6346.16162.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cursor-options
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 210 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cursor-options
    • > Notice in wp-content/plugins/beautify-cursor/framework/functions/helper.php+92
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/beautify-cursor/app/config/xr.framework.config.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beautify-cursor/framework/functions/enqueue.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (The available Icons with the plugin so far.) image required
Please take inspiration from this readme.txt

beautify-cursor/beautify-cursor.php Passed 13 tests

The entry point to "Beautify Cursor" version 1.0 is a PHP file that has certain tags in its header comment area
88 characters long description:
Beautify your cursor style based on the wide variety of icons available with the plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,842 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22629784
SVG100685
PHP786148276
CSS215297

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
70 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/assets/img/weapon-crosshair-2.png0.96KB0.39KB▼ 58.84%
app/assets/img/click-gesture-1.png1.02KB0.71KB▼ 30.36%
app/assets/img/rubbish-bin.png0.87KB0.53KB▼ 39.37%
app/assets/img/clothing-tag.png0.72KB0.28KB▼ 61.04%
app/assets/img/map-pin.png0.96KB0.57KB▼ 40.47%