84% wp-mobile-x

Code Review | WP Mobile X

WordPress plugin WP Mobile X scored84%from 54 tests.

About plugin

  • Plugin page: wp-mobile-x
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2018
  • Latest release: Nov 9, 2023
  • Number of updates: 37
  • Update frequency: every 57.1 days
  • Top authors: whyun (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /13,811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▲1.38ms] Passed 4 tests

This is a short check of server-side resources used by WP Mobile X
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.54 ▼1.07
Dashboard /wp-admin3.58 ▲0.2350.43 ▼9.67
Posts /wp-admin/edit.php3.69 ▲0.3455.38 ▲8.66
Add New Post /wp-admin/post-new.php6.17 ▲0.2997.65 ▲7.61
Media Library /wp-admin/upload.php3.50 ▲0.2739.61 ▲9.60

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mobile X
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5514.14 ▲0.001.69 ▲0.0340.08 ▼2.88
Dashboard /wp-admin2,210 ▲365.60 ▼0.0694.65 ▲2.9939.13 ▼1.30
Posts /wp-admin/edit.php2,112 ▲121.98 ▲0.0339.03 ▲2.2435.42 ▲1.68
Add New Post /wp-admin/post-new.php1,554 ▲2523.59 ▲0.70607.85 ▲20.0332.22 ▼19.10
Media Library /wp-admin/upload.php1,412 ▲124.13 ▼0.04100.30 ▲4.2946.04 ▲5.78

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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 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 fix the following
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-mobile-x/themes/mobx-default/archive.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-mobile-x/themes/mobx-default/category.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-mobile-x/themes/mobx-default/footer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-mobile-x/themes/mobx-default/functions-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-mobile-x/themes/mobx-default/index.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-mobile-x/includes/functions-theme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-mobile-x/themes/mobx-default/404.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-mobile-x/themes/mobx-default/search.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-mobile-x/wp-mobile-x.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-mobile-x/themes/mobx-default/tag.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: wp mobile x, mobile theme

wp-mobile-x/wp-mobile-x.php Passed 13 tests

"WP Mobile X" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
32 characters long description:
Enable a theme for mobile device

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin6,714 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,734
JavaScript46382191,962
PHP24172801,956
PO File120049658
CSS5084

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity79.20
▷ Minimum class complexity16.00
▷ Maximum class complexity218.00
Average method complexity10.54
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods614.63%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/mobx-default/screenshot.png13.25KB5.00KB▼ 62.24%
themes/mobx-default/images/logo.png4.96KB2.21KB▼ 55.35%