84% generate-disable-mobile

Code Review | Generate Disable Mobile

WordPress plugin Generate Disable Mobile scored84%from 54 tests.

About plugin

  • Plugin page: generate-disable-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: May 23, 2015
  • Latest release: May 23, 2015
  • Number of updates: 3
  • Update frequency: every 9.7 days
  • Top authors: edge22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,220 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.23ms] Passed 4 tests

This is a short check of server-side resources used by Generate Disable Mobile
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0724.65 ▼15.17
Dashboard /wp-admin3.31 ▲0.0158.13 ▲10.14
Posts /wp-admin/edit.php3.37 ▲0.0148.72 ▼8.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.93 ▼21.23
Media Library /wp-admin/upload.php3.24 ▲0.0134.88 ▼0.29

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Generate Disable Mobile: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4614.42 ▼0.141.61 ▼0.2344.44 ▼1.23
Dashboard /wp-admin2,203 ▲215.84 ▲0.0397.34 ▼4.9636.58 ▼6.52
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0135.91 ▼5.0533.67 ▼2.71
Add New Post /wp-admin/post-new.php1,532 ▲1023.10 ▼0.16634.32 ▼31.5150.95 ▼1.24
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0594.84 ▼3.1343.97 ▼1.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-disable-mobile/generate-disable-mobile.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: generatepress, disable mobile

generate-disable-mobile/generate-disable-mobile.php Passed 13 tests

The main file in "Generate Disable Mobile" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
51 characters long description:
Disable mobile responsive features in GeneratePress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin485 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS11134438
PHP1112747

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin