84% mobile-responsive-spacers

Code Review | Mobile Responsive Spacers

WordPress plugin Mobile Responsive Spacers scored84%from 54 tests.

About plugin

  • Plugin page: mobile-responsive...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Oct 1, 2021
  • Number of updates: 4
  • Update frequency: every 7.0 days
  • Top authors: justmoritz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.06ms] Passed 4 tests

This is a short check of server-side resources used by Mobile Responsive Spacers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.95 ▲0.73
Dashboard /wp-admin3.34 ▲0.0351.40 ▲3.43
Posts /wp-admin/edit.php3.39 ▲0.0351.14 ▼2.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.17 ▼4.74
Media Library /wp-admin/upload.php3.26 ▲0.0335.94 ▼1.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile Responsive Spacers
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.25 ▼0.102.08 ▲0.2543.40 ▲1.79
Dashboard /wp-admin2,211 ▲345.55 ▼0.1285.68 ▼8.4143.15 ▲2.72
Posts /wp-admin/edit.php2,119 ▲161.99 ▲0.0235.65 ▼5.9533.93 ▼1.85
Add New Post /wp-admin/post-new.php1,539 ▲1323.45 ▲0.37695.93 ▲1.1657.90 ▲2.69
Media Library /wp-admin/upload.php1,419 ▲194.21 ▲0.0497.57 ▼14.5344.93 ▼2.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-responsive-spacers/mobile-responsive-spacers.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: responsive spacers, mobile spacers, adjust spacers, spacers, halve spacers

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

Analyzing the main PHP file in "Mobile Responsive Spacers" version 1.2.1
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin148 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1303794
JavaScript1151535
JSON10014
Markdown1205

PHP code Passed 2 tests

This is a very shot 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.06
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin