89% show-current-width

Code Review | Show Current Width

WordPress plugin Show Current Width scored89%from 54 tests.

About plugin

  • Plugin page: show-current-width
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2023
  • Latest release: Nov 13, 2023
  • Number of updates: 18
  • Update frequency: every 3.2 days
  • Top authors: web83info (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /713 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.81ms] Passed 4 tests

This is a short check of server-side resources used by Show Current Width
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1743.13 ▲1.53
Dashboard /wp-admin3.47 ▲0.1247.51 ▼15.34
Posts /wp-admin/edit.php3.58 ▲0.2251.37 ▲6.23
Add New Post /wp-admin/post-new.php6.05 ▲0.1692.41 ▼2.29
Media Library /wp-admin/upload.php3.39 ▲0.1638.66 ▲4.86
Show Current Width /wp-admin/options-general.php?page=show-current-width3.3635.72

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 16 new options
New WordPress options
show-current-width_breakpoints_limitwidth_max
theysaidso_admin_options
show-current-width_admin_show
can_compress_scripts
show-current-width_breakpoints_limitwidth
show-current-width_other_init
show-current-width_breakpoints_show
widget_recent-comments
show-current-width_breakpoints_limitwidth_min
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Show Current Width
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19414.43 ▼0.286.42 ▲4.6946.70 ▲3.11
Dashboard /wp-admin2,199 ▲185.62 ▲0.0389.74 ▼18.3538.32 ▼3.32
Posts /wp-admin/edit.php2,101 ▲12.01 ▲0.0040.23 ▲2.6737.68 ▲1.57
Add New Post /wp-admin/post-new.php1,529 ▲323.02 ▼0.28613.43 ▲14.8656.02 ▲6.41
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.0197.69 ▼1.9742.65 ▲1.83
Show Current Width /wp-admin/options-general.php?page=show-current-width9262.0022.2531.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 16 options
    • show-current-width_condition_role
    • widget_recent-comments
    • show-current-width_other_uninstall
    • show-current-width_breakpoints_limitwidth_min
    • show-current-width_breakpoints_definition
    • show-current-width_animation_show
    • db_upgraded
    • show-current-width_breakpoints_limitwidth
    • show-current-width_breakpoints_show
    • show-current-width_other_init
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: design, admin, developement, width

show-current-width/w83-show-current-width.php 85% from 13 tests

The entry point to "Show Current Width" version 1.2.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.2" instead of "6.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("show-current-width.php" instead of "w83-show-current-width.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin894 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP664228634
Sass1230101
JavaScript214288
CSS21071

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.67
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2187.50%
▷ Protected methods14.17%
▷ Private methods28.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 1.17MB with 0.75MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png496.55KB167.28KB▼ 66.31%
screenshot-3.png204.79KB65.24KB▼ 68.14%
screenshot-1.png496.08KB203.00KB▼ 59.08%