84% cursor-trail

Code Review | Cursor Trail

WordPress plugin Cursor Trail scored84%from 54 tests.

About plugin

  • Plugin page: cursor-trail
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2011
  • Latest release: Apr 1, 2023
  • Number of updates: 18
  • Update frequency: every 246.0 days
  • Top authors: netweblogic (94.44%)msykes (11.11%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,218 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.36ms] Passed 4 tests

An overview of server-side resources used by Cursor Trail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.07 ▼1.46
Dashboard /wp-admin3.34 ▲0.0348.92 ▼1.88
Posts /wp-admin/edit.php3.39 ▲0.0357.02 ▲2.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.36 ▼10.14
Media Library /wp-admin/upload.php3.26 ▲0.0339.23 ▲0.05
Cursor Trail /wp-admin/options-general.php?page=cursor-trail3.2332.71

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/cursor-trail/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
cursor_trail_options

Browser metrics Passed 4 tests

An overview of browser requirements for Cursor Trail
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6113.26 ▼0.982.02 ▲0.2146.45 ▲1.49
Dashboard /wp-admin2,225 ▲224.89 ▼1.00111.51 ▲7.1243.58 ▼3.37
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0039.78 ▲2.5438.34 ▲3.52
Add New Post /wp-admin/post-new.php1,548 ▲2223.34 ▲5.71662.30 ▼57.5861.71 ▲1.03
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.0096.58 ▼6.4545.64 ▲0.37
Cursor Trail /wp-admin/options-general.php?page=cursor-trail9882.0527.8349.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • cursor_trail_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 2× 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/cursor-trail/cursor-trail.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cursor-trail/cursor-trail-admin.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% 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: A description for screenshot #2 is required in cursor-trail/assets to your readme.txt
Please take inspiration from this readme.txt

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

The primary PHP file in "Cursor Trail" version 1.1 is used by WordPress to initiate all plugin functionality
84 characters long description:
Add a cursor trail to your website mouse pointer, with custom pointer image and url.

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
Success! There were no dangerous files found in this plugin195 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21125195

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
valentines.png0.41KB0.32KB▼ 21.43%
pointer.png0.27KB0.32KB0.00%