79% mobile-blocks

Code Review | Mobile blocks

WordPress plugin Mobile blocks scored79%from 54 tests.

About plugin

  • Plugin page: mobile-blocks
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Jan 16, 2019
  • Latest release: Mar 28, 2022
  • Number of updates: 6
  • Update frequency: every 200.0 days
  • Top authors: takanakui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,816 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.90MB] [CPU: ▲24.87ms] Passed 4 tests

Analyzing server-side resources used by Mobile blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /8.80 ▲5.3473.37 ▲30.32
Dashboard /wp-admin8.82 ▲5.5270.04 ▲23.21
Posts /wp-admin/edit.php8.82 ▲5.4767.29 ▲16.13
Add New Post /wp-admin/post-new.php9.15 ▲3.26121.91 ▲32.49
Media Library /wp-admin/upload.php8.82 ▲5.6065.07 ▲29.83
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius8.8255.55

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 174 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
fs_debug_mode
widget_recent-posts
db_upgraded
fs_accounts
fs_gdpr
fs_active_plugins
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Mobile blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.63 ▼0.802.02 ▼0.1134.66 ▼5.35
Dashboard /wp-admin2,243 ▲555.85 ▼0.03102.10 ▼2.9742.24 ▲1.64
Posts /wp-admin/edit.php2,126 ▲342.01 ▲0.0235.55 ▼7.3636.36 ▼1.64
Add New Post /wp-admin/post-new.php1,535 ▲117.44 ▼5.74617.31 ▼67.4751.27 ▼8.35
Media Library /wp-admin/upload.php1,425 ▲404.18 ▼0.0395.91 ▼3.7646.05 ▲2.51
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius1,0721.7126.7129.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/mobile-blocks/freemius/includes/class-freemius.php+8911
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • fs_active_plugins
    • fs_debug_mode
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • fs_accounts
    • fs_gdpr

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (**Mobile blocks Example.**) image missing
You can look at the official readme.txt

mobile-blocks/mobile-blocks.php Passed 13 tests

The main PHP script in "Mobile blocks" version 1.2.1 is automatically included on every request by WordPress
89 characters long description:
Boost the user experience with dedicate mobile blocks. Keep your mobile visitors engaged.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin32,826 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
PHP1137,75516,86832,369
Markdown1680214
JavaScript33459194
JSON10027
CSS130022

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,029)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.73
▷ Minimum class complexity1.00
▷ Maximum class complexity3,029.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,214
▷ Static methods18114.91%
▷ Public methods85370.26%
▷ Protected methods151.24%
▷ Private methods34628.50%
Functions93
▷ Named functions93100.00%
▷ Anonymous functions00.00%
Constants130
▷ Global constants9875.38%
▷ Class constants3224.62%
▷ Public constants32100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png2.03KB1.73KB▼ 14.71%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%