78% obox-mobile

Code Review | Pronto - Mobile Site Convertor

WordPress plugin Pronto - Mobile Site Convertor scored78%from 54 tests.

About plugin

  • Plugin page: obox-mobile
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 17, 2019
  • Latest release: Mar 26, 2020
  • Number of updates: 21
  • Update frequency: every 4.8 days
  • Top authors: obox (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /4,879 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.53MB] [CPU: ▲2.94ms] Passed 4 tests

Analyzing server-side resources used by Pronto - Mobile Site Convertor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5543.75 ▲1.40
Dashboard /wp-admin3.83 ▲0.5355.41 ▼0.87
Posts /wp-admin/edit.php3.95 ▲0.5955.63 ▲2.43
Add New Post /wp-admin/post-new.php6.41 ▲0.52103.72 ▲8.81
Media Library /wp-admin/upload.php3.76 ▲0.5342.45 ▲10.88

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 106 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
obox-mobile
widget_obox_mobile_slider_widget
widget_obox_mobile_content_widget
widget_recent-comments

Browser metrics Passed 4 tests

Pronto - Mobile Site Convertor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.84 ▼0.451.58 ▼0.5642.88 ▼5.34
Dashboard /wp-admin2,237 ▲465.10 ▼0.8197.72 ▼13.9540.29 ▼6.52
Posts /wp-admin/edit.php2,118 ▲292.29 ▲0.2339.49 ▼0.2534.84 ▼1.47
Add New Post /wp-admin/post-new.php1,545 ▲1023.29 ▼0.09677.49 ▲6.1156.11 ▼8.64
Media Library /wp-admin/upload.php1,413 ▲224.34 ▲0.19106.29 ▲8.6744.89 ▲0.93
General /wp-admin/mobile-menus.php260.440.0913.43
Adverts /wp-admin/mobile-menus.php?page=mobile-adverts260.440.116.17
Customization /wp-admin/mobile-menus.php?page=mobile-customize260.440.099.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_obox_mobile_slider_widget
    • obox-mobile
    • widget_recent-posts
    • widget_obox_mobile_content_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 95× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include(OBOXMOBILEDIR/functions/adverts.php): failed to open stream: No such file or directory in wp-content/plugins/obox-mobile/admin/load-includes.php on line 9
    • > PHP Warning
      include(OBOXMOBILEDIR/functions/class.php): failed to open stream: No such file or directory in wp-content/plugins/obox-mobile/admin/load-includes.php on line 4
    • > PHP Warning
      include(OBOXMOBILEDIR/functions/mobi_switch.php): failed to open stream: No such file or directory in wp-content/plugins/obox-mobile/admin/load-includes.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/obox-mobile/admin/config/navs-and-sidebars.php:64
    • > PHP Warning
      include(OBOXMOBILEDIR/functions/template.php): failed to open stream: No such file or directory in wp-content/plugins/obox-mobile/admin/load-includes.php on line 7
    • > PHP Warning
      include(OBOXMOBILEDIR/functions/hooks.php): failed to open stream: No such file or directory in wp-content/plugins/obox-mobile/admin/load-includes.php on line 10
    • > PHP Warning
      include(OBOXMOBILEDIR/functions/media.php): failed to open stream: No such file or directory in wp-content/plugins/obox-mobile/admin/load-includes.php on line 8
    • > PHP Warning
      Use of undefined constant OBOXMOBILEDIR - assumed 'OBOXMOBILEDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/obox-mobile/admin/load-includes.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/obox-mobile/admin/includes/save-functions.php:166
    • > PHP Warning
      include(): Failed opening 'OBOXMOBILEDIR/admin/config/options.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/obox-mobile/admin/load-includes.php on line 19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/mobile-menus.php
    • > Network (severe)
    wp-admin/mobile-menus.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/mobile-menus.php?page=mobile-adverts
    • > Network (severe)
    wp-admin/mobile-menus.php?page=mobile-adverts - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/mobile-menus.php?page=mobile-customize
    • > Network (severe)
    wp-admin/mobile-menus.php?page=mobile-customize - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: responsive, mobile, jetpack, woocommerce, iphone...

obox-mobile/mobile.php 92% from 13 tests

The principal PHP file in "Pronto - Mobile Site Convertor" v. 1.1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("obox-mobile.php" instead of "mobile.php")

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
Success! There were no dangerous files found in this plugin7,335 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP424822013,531
CSS63274092,186
JavaScript73953881,236
PO File1172417382

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity40.00
▷ Minimum class complexity16.00
▷ Maximum class complexity81.00
Average method complexity7.78
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
39 PNG files occupy 0.31MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme/images/layout/menu-li.png0.19KB0.10KB▼ 46.88%
admin/images/layouts/center-no-logo-off.png0.45KB0.23KB▼ 49.35%
admin/images/layouts/center-no-text-off.png0.45KB0.23KB▼ 49.35%
admin/images/layouts/default-on.png0.64KB0.37KB▼ 42.25%
theme/layers/comment-bg.png0.22KB0.18KB▼ 19.91%