10% wp-mobi

Code Review | WpMobi

WordPress plugin WpMobi scored 10% from 54 tests.

About plugin

  • Plugin page: wp-mobi
  • Plugin version: 0.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2019
  • Latest release: Feb 16, 2020
  • Number of updates: 3
  • Update frequency: every 44.4 days
  • Top authors: rahulbhangale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 505 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-mobi/index.php+18
    Undefined index: tab

Server metrics [RAM: ▼1.82MB] [CPU: ▼51.02ms] Passed 4 tests

An overview of server-side resources used by WpMobi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.13 ▼7.45
Dashboard /wp-admin2.12 ▼1.186.43 ▼44.99
Posts /wp-admin/edit.php2.12 ▼1.236.88 ▼39.07
Add New Post /wp-admin/post-new.php2.12 ▼3.766.24 ▼93.14
Media Library /wp-admin/upload.php2.12 ▼1.106.49 ▼26.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WpMobi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲22014.82 ▲0.441.68 ▼0.5740.03 ▼8.05
Dashboard /wp-admin2,358 ▲1706.40 ▲1.54118.14 ▲1.6339.65 ▼7.39
Posts /wp-admin/edit.php2,267 ▲1783.34 ▲1.3252.47 ▲17.4030.63 ▼3.52
Add New Post /wp-admin/post-new.php1,543 ▲1023.26 ▲0.06603.90 ▼54.9333.56 ▼16.41
Media Library /wp-admin/upload.php1,403 ▲124.14 ▼0.0879.85 ▼18.2642.27 ▼0.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-mobi/index.php+18
    Undefined index: tab
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-mobi/admin_panel/views/nav_tabs.php
    • > /wp-content/plugins/wp-mobi/admin_panel/views/messages.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_MOBI_PATH - assumed 'WP_MOBI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-mobi/admin_panel/views/view_build_and_publish.php on line 5
    • > PHP Warning
      require_once(WP_MOBI_PATHadmin_panel/views/messages.php): failed to open stream: No such file or directory in wp-content/plugins/wp-mobi/admin_panel/views/general_settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'CCore' not found in wp-content/plugins/wp-mobi/src/WpMobiShortcode..class.php:4
    • > PHP Notice
      Undefined variable: nav_tabs in wp-content/plugins/wp-mobi/admin_panel/views/nav_tabs.php on line 3
    • > PHP Warning
      Use of undefined constant WP_MOBI_PATH - assumed 'WP_MOBI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-mobi/admin_panel/views/general_settings.php on line 5
    • > PHP Notice
      Undefined variable: success_msgs in wp-content/plugins/wp-mobi/admin_panel/views/messages.php on line 8
    • > PHP Warning
      require_once(WP_MOBI_PATHadmin_panel/views/messages.php): failed to open stream: No such file or directory in wp-content/plugins/wp-mobi/admin_panel/views/view_build_and_publish.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'CCore' not found in wp-content/plugins/wp-mobi/admin_panel/CWpMobiAdmin.class.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-mobi/admin_panel/views/nav_tabs.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_MOBI_PATHadmin_panel/views/messages.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mobi/admin_panel/views/general_settings.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: application, mobile, app, android

wp-mobi/index.php 92% from 13 tests

This is the main PHP file of "WpMobi" version 0.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-mobi.php" instead of "index.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
Good job! No executable or dangerous file extensions detected957 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP152188776
CSS22922132
JavaScript110649

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.38
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods104
▷ Static methods10.96%
▷ Public methods10399.04%
▷ Protected methods00.00%
▷ Private methods10.96%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/androidlogo.png9.99KB10.22KB0.00%