89% mobile-responsive-sidebar

Code Review | Mobile Responsive Sidebar

WordPress plugin Mobile Responsive Sidebar scored89%from 54 tests.

About plugin

  • Plugin page: mobile-responsive...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: May 18, 2020
  • Latest release: Jul 10, 2020
  • Number of updates: 10
  • Update frequency: every 10.9 days
  • Top authors: 3xweb (100%)Otto42 (20%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.13ms] Passed 4 tests

A check of server-side resources used by Mobile Responsive Sidebar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.29 ▼8.74
Dashboard /wp-admin3.31 ▼0.0342.85 ▼20.03
Posts /wp-admin/edit.php3.36 ▲0.0146.00 ▼5.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.50 ▼2.23
Media Library /wp-admin/upload.php3.23 ▲0.0032.83 ▼0.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Mobile Responsive Sidebar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲17213.67 ▼0.705.99 ▲3.9644.86 ▲0.21
Dashboard /wp-admin2,209 ▲214.88 ▼0.14111.78 ▼2.5842.56 ▼2.58
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0338.78 ▲1.2635.30 ▲1.92
Add New Post /wp-admin/post-new.php1,542 ▲2317.70 ▼5.12600.82 ▼68.1153.64 ▼10.31
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0798.74 ▼1.5543.42 ▼1.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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 93% 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 need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Mobile sidebar on phone screen.), #2 (Open sidebar on phone screen.)
The official readme.txt is a good inspiration

mobile-responsive-sidebar/mobile-responsive-sidebar.php 92% from 13 tests

The main PHP file in "Mobile Responsive Sidebar" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected102 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS12150
JavaScript2111126
PHP242026

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
4 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.85KB14.17KB▼ 65.32%
screenshot-2.png32.34KB11.16KB▼ 65.50%
trunk/screenshot-1.png40.85KB14.17KB▼ 65.32%
trunk/screenshot-2.png32.34KB11.16KB▼ 65.50%