83% sneakers

Code Review | Sneakers

WordPress plugin Sneakers scored83%from 54 tests.

About plugin

  • Plugin page: sneakers
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Sep 13, 2014
  • Latest release: Dec 28, 2020
  • Number of updates: 22
  • Update frequency: every 104.5 days
  • Top authors: gangesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼1.98ms] Passed 4 tests

An overview of server-side resources used by Sneakers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2542.29 ▲0.94
Dashboard /wp-admin3.65 ▲0.3452.23 ▲1.01
Posts /wp-admin/edit.php3.70 ▲0.3553.81 ▲0.73
Add New Post /wp-admin/post-new.php6.27 ▲0.3888.93 ▼9.68
Media Library /wp-admin/upload.php3.49 ▲0.2637.49 ▲0.10
Sneakers /wp-admin/edit.php?post_type=sneaker3.5641.95
Add Sneaker /wp-admin/post-new.php?post_type=sneaker3.8855.44

Server storage [IO: ▲0.62MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sneakers
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲20414.45 ▲0.081.75 ▼0.0667.20 ▲23.76
Dashboard /wp-admin2,362 ▲1826.13 ▲0.46114.03 ▲20.7038.72 ▼2.05
Posts /wp-admin/edit.php2,290 ▲1933.30 ▲1.2853.01 ▲15.9332.44 ▼2.71
Add New Post /wp-admin/post-new.php6,292 ▲4,76625.98 ▲2.95856.09 ▲231.5047.91 ▼9.04
Media Library /wp-admin/upload.php1,427 ▲274.14 ▼0.0982.62 ▼22.9144.08 ▼3.79
Sneakers /wp-admin/edit.php?post_type=sneaker1,2543.2046.7525.92
Add Sneaker /wp-admin/post-new.php?post_type=sneaker3,1698.26217.7678.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sneakers/inc/metaboxes.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sneakers/sneakers.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sneakers/init.php:40

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)
No browser issues were found

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
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

sneakers/sneakers.php 85% from 13 tests

"Sneakers" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "4.4")
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,285 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP75327511,563
CSS3827657
SVG100414
XML1816344
JavaScript570103307

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity64.80
▷ Minimum class complexity20.00
▷ Maximum class complexity177.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods108
▷ Static methods9688.89%
▷ Public methods10092.59%
▷ Protected methods00.00%
▷ Private methods87.41%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
images/ico-delete.png0.70KB0.72KB0.00%
images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%