84% mobile-only-desktop-only-content

Code Review | Wordpress Mobile only & Desktop Only Content

WordPress plugin Wordpress Mobile only & Desktop Only Content scored84%from 54 tests.

About plugin

  • Plugin page: mobile-only-deskt...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2016
  • Latest release: Sep 13, 2017
  • Number of updates: 26
  • Update frequency: every 19.4 days
  • Top authors: uzyr (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /10,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Wordpress Mobile only & Desktop Only Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.77 ▼4.12
Dashboard /wp-admin3.31 ▲0.0145.33 ▼2.66
Posts /wp-admin/edit.php3.36 ▲0.0146.09 ▲1.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.03 ▼4.21
Media Library /wp-admin/upload.php3.23 ▲0.0135.19 ▲1.42

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Mobile only & Desktop Only Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.40 ▼1.331.83 ▼0.0541.61 ▼6.50
Dashboard /wp-admin2,212 ▲245.83 ▲0.9795.95 ▼19.2040.57 ▼3.85
Posts /wp-admin/edit.php2,094 ▲52.02 ▲0.0239.04 ▲2.8837.28 ▲2.81
Add New Post /wp-admin/post-new.php1,530 ▼422.83 ▼0.25662.79 ▼7.5256.50 ▲12.79
Media Library /wp-admin/upload.php1,393 ▲24.27 ▲0.0494.37 ▼7.3241.72 ▲0.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mobile-only-desktop-only-content/mainfile.php:23

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 93% from 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
6 plugin tags: desktop only, hide from mobile, wordpress mobile, mobile only, hide from desktop...

mobile-only-desktop-only-content/mainfile.php 85% from 13 tests

"Wordpress Mobile only & Desktop Only Content" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 241 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("mobile-only-desktop-only-content.php" instead of "mainfile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin28 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1271026
JavaScript1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin