78% cursor-control

Code Review | Cursor Control

WordPress plugin Cursor Control scored78%from 54 tests.

About plugin

  • Plugin page: cursor-control
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.8
  • WordPress version: 6.3.1
  • First release: Jan 23, 2014
  • Latest release: Feb 18, 2014
  • Number of updates: 8
  • Update frequency: every 3.3 days
  • Top authors: clevelandwebdeveloper (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /9,216 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.90ms] Passed 4 tests

An overview of server-side resources used by Cursor Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.59 ▼1.62
Dashboard /wp-admin3.39 ▲0.0849.58 ▼5.84
Posts /wp-admin/edit.php3.50 ▲0.1549.89 ▲3.11
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.07 ▼7.18
Media Library /wp-admin/upload.php3.31 ▲0.0838.92 ▲3.03
Cursor Control /wp-admin/options-general.php?page=cursor_control-setting-admin3.2834.80

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Cursor Control
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3514.34 ▼0.201.86 ▼0.1738.65 ▼3.62
Dashboard /wp-admin2,199 ▲225.58 ▼0.0891.66 ▼0.6443.41 ▲1.75
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0238.74 ▲1.7735.96 ▲0.02
Add New Post /wp-admin/post-new.php1,529 ▲120.68 ▼2.50634.23 ▼31.2755.23 ▲2.43
Media Library /wp-admin/upload.php1,407 ▲134.22 ▲0.02102.71 ▲0.9245.13 ▼1.20
Cursor Control /wp-admin/options-general.php?page=cursor_control-setting-admin1,1693.0341.6466.24

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=cursor_control-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=cursor_control-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cursor_control-setting-admin
    • > Notice in wp-content/plugins/cursor-control/index.php+365
    Undefined index: class

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cursor-control/index.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: The official readme.txt might help

cursor-control/index.php 92% from 13 tests

This is the main PHP file of "Cursor Control" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cursor-control.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin421 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16382398
JavaScript114523

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected