68% mobile-redirect-for-onemobi

Code Review | Mobile Redirect for onemobi

WordPress plugin Mobile Redirect for onemobi scored68%from 54 tests.

About plugin

  • Plugin page: mobile-redirect-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2013
  • Latest release: Feb 16, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: meisam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /801 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼33.22ms] Passed 4 tests

Server-side resources used by Mobile Redirect for onemobi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1041.51 ▲5.68
Dashboard /wp-admin3.08 ▼0.2225.16 ▼22.15
Posts /wp-admin/edit.php3.08 ▼0.2723.07 ▼25.94
Add New Post /wp-admin/post-new.php3.08 ▼2.8023.15 ▼70.20
Media Library /wp-admin/upload.php3.08 ▼0.1421.12 ▼14.59
onemobi Redirect /wp-admin/options-general.php?page=onemobi-redirect3.0823.68

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Mobile Redirect for onemobi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.53 ▼0.751.68 ▼0.2942.61 ▲1.32
Dashboard /wp-admin2,210 ▲395.86 ▲0.7894.83 ▼14.6538.71 ▼14.55
Posts /wp-admin/edit.php2,090 ▲11.96 ▼0.0436.13 ▼4.2034.49 ▼0.78
Add New Post /wp-admin/post-new.php1,543 ▲123.29 ▲4.86671.62 ▲56.7356.85 ▲0.32
Media Library /wp-admin/upload.php1,392 ▲104.19 ▼0.0296.28 ▼3.2442.71 ▼2.39
onemobi Redirect /wp-admin/options-general.php?page=onemobi-redirect8562.0622.1430.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=onemobi-redirect
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-redirect-for-onemobi/onemobi-redirect.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mobile-redirect-for-onemobi/onemobi-admin.php:70

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

mobile-redirect-for-onemobi/onemobi-redirect.php 92% from 13 tests

The entry point to "Mobile Redirect for onemobi" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mobile-redirect-for-onemobi.php" instead of "onemobi-redirect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin495 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3178322495

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code1.03
Average class complexity104.00
▷ Minimum class complexity104.00
▷ Maximum class complexity104.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2392.00%
▷ Protected methods00.00%
▷ Private methods28.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin