10% sparky-logos

Code Review | Sparky Logos

WordPress plugin Sparky Logos scored10%from 54 tests.

About plugin

  • Plugin page: sparky-logos
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2015
  • Latest release: Sep 3, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: vidya_l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /792 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/sparky-logos/sparky_logos.php+24
    Undefined variable: wpdb

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.81ms] Passed 4 tests

Server-side resources used by Sparky Logos
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.99 ▼32.16
Dashboard /wp-admin2.07 ▼1.234.78 ▼46.61
Posts /wp-admin/edit.php2.07 ▼1.297.44 ▼43.78
Add New Post /wp-admin/post-new.php2.07 ▼3.825.98 ▼92.67
Media Library /wp-admin/upload.php2.07 ▼1.164.89 ▼31.27
All Logos /wp-admin/edit.php?post_type=sparky_logo2.075.95
Add New /wp-admin/post-new.php?post_type=sparky_logo2.077.38
Categories /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo2.077.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Sparky Logos
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲18414.02 ▲0.808.27 ▲4.0241.69 ▼0.38
Dashboard /wp-admin2,236 ▲455.97 ▲0.8996.48 ▼6.1639.13 ▼2.30
Posts /wp-admin/edit.php2,122 ▲332.04 ▲0.0535.48 ▲1.2533.65 ▼0.06
Add New Post /wp-admin/post-new.php1,542 ▲2017.56 ▼5.40740.18 ▲66.3259.80 ▲8.33
Media Library /wp-admin/upload.php1,418 ▲334.20 ▲0.0295.06 ▼0.3639.83 ▼1.10
All Logos /wp-admin/edit.php?post_type=sparky_logo1,0981.9932.7428.14
Add New /wp-admin/post-new.php?post_type=sparky_logo2,3507.77187.0272.28
Categories /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo1,2952.1425.6928.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/sparky-logos/sparky_logos.php+24
    Undefined variable: wpdb
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 0% 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)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo
    • > Notice in wp-content/plugins/sparky-logos/sparky_logos.php+24
    Undefined variable: wpdb
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo
    • > Notice in wp-content/plugins/sparky-logos/sparky_logos.php+24
    Trying to get property 'prefix' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom_sl_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom_sl_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=sparky_logo_categories&post_type=sparky_logo
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/sparky-logos/admin/functions.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sparky-logos/sparky_logos.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=sparky_logo
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sparky-logos/admin/sparky-logo.js?wp-mce-49110-20201110:49:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=sparky_logo
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can look at the official readme.txt

sparky-logos/sparky_logos.php 85% from 13 tests

Analyzing the main PHP file in "Sparky Logos" version 1.0.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("sparky-logos.php" instead of "sparky_logos.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin1,989 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4219241,378
CSS43528399
PHP24416212

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/gallery.png3.35KB0.76KB▼ 77.41%
admin/owl-carousel/grabbing.png0.11KB0.14KB0.00%
admin/overlay.png0.11KB0.15KB0.00%