67% mobilook

Code Review | Mobile View for Responsive web design optimization (UX design) + Mobile Friendly Test

WordPress plugin Mobile View for Responsive web design optimization (UX design) + Mobile Friendly Test scored67%from 54 tests.

About plugin

  • Plugin page: mobilook
  • Plugin version: 1.2.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: May 17, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 52
  • Update frequency: every 30.0 days
  • Top authors: pagup (96.15%)The-Rock (5.77%)

Code review

54 tests

User reviews

25 reviews

Install metrics

1,000+ active /32,149 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲5.12MB] [CPU: ▲22.99ms] 75% from 4 tests

An overview of server-side resources used by Mobile View for Responsive web design optimization (UX design) + Mobile Friendly Test
Please have a look at the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.12MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.00 ▲5.5469.54 ▲29.57
Dashboard /wp-admin9.02 ▲5.6769.21 ▲9.29
Posts /wp-admin/edit.php9.02 ▲5.6682.81 ▲36.06
Add New Post /wp-admin/post-new.php9.50 ▲3.61112.01 ▲17.03
Media Library /wp-admin/upload.php9.02 ▲5.7971.28 ▲37.96
Mobilook /wp-admin/options-general.php?page=mobilook9.0261.13
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0256.83

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 249 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
fs_debug_mode
theysaidso_admin_options
fs_active_plugins
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Mobile View for Responsive web design optimization (UX design) + Mobile Friendly Test
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12214.76 ▲0.381.81 ▼0.0529.23 ▼15.14
Dashboard /wp-admin2,249 ▲615.84 ▲0.95105.34 ▼6.6142.64 ▼0.80
Posts /wp-admin/edit.php2,135 ▲462.04 ▲0.0341.64 ▲0.9138.18 ▲1.21
Add New Post /wp-admin/post-new.php1,551 ▲3722.27 ▲4.76679.24 ▲6.0660.14 ▲9.46
Media Library /wp-admin/upload.php1,428 ▲494.25 ▲0.0999.22 ▼6.3447.74 ▲1.12
Mobilook /wp-admin/options-general.php?page=mobilook1,0341.9934.6462.78
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0872.2326.8829.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/mobilook/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • fs_active_plugins
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • fs_debug_mode
    • fs_accounts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/mobilook/admin/inc/metabox_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobilook/admin/metabox.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mobilook/inc/sidebar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/mobilook/inc/faq.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobilook/inc/notices.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=mobilook
    • > Javascript (severe) in unknown
    /wp-content/plugins/mobilook/assets/mobilook-script-admin.min.js?ver=1640216768 0:1318 Uncaught TypeError: Cannot read properties of null (reading 'contentDocument')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #3, #4 in mobilook/assets to your readme.txt
Please take inspiration from this readme.txt

mobilook/mobilook.php 92% from 13 tests

"Mobile View for Responsive web design optimization (UX design) + Mobile Friendly Test" version 1.2.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 229 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin55,057 lines of code in 194 files:
LanguageFilesBlank linesComment linesLines of code
PHP1278,16817,38434,210
PO File187,7509,39017,392
Sass28399772,515
CSS143613631
JavaScript7103168309

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.10
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,270
▷ Static methods20115.83%
▷ Public methods88169.37%
▷ Protected methods171.34%
▷ Private methods37229.29%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.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.31MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/freemius/assets/img/mobilook.png31.33KB9.85KB▼ 68.57%
assets/imgs/meta-box.png261.50KB71.31KB▼ 72.73%