79% mobile-css

Code Review | Mobile CSS

WordPress plugin Mobile CSS scored79%from 54 tests.

About plugin

  • Plugin page: mobile-css
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Oct 9, 2012
  • Latest release: Sep 5, 2013
  • Number of updates: 9
  • Update frequency: every 37.2 days
  • Top authors: maxaud (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /11,720 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
Installer ran successfully

Server metrics [RAM: ▼0.57MB] [CPU: ▼29.52ms] Passed 4 tests

A check of server-side resources used by Mobile CSS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1846.90 ▲2.95
Dashboard /wp-admin3.38 ▼0.0036.69 ▼32.53
Posts /wp-admin/edit.php3.63 ▲0.2351.06 ▼3.36
Add New Post /wp-admin/post-new.php3.37 ▼2.5636.86 ▼78.34
Media Library /wp-admin/upload.php3.39 ▲0.1231.89 ▼3.83
CSS Rules /wp-admin/edit.php?post_type=mc_rule3.4335.37
Create New /wp-admin/post-new.php?post_type=mc_rule3.3636.25

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile CSS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲5814.35 ▲0.052.15 ▲0.2843.73 ▼1.14
Dashboard /wp-admin2,225 ▲485.52 ▼0.0993.54 ▼0.1342.99 ▼3.60
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0135.24 ▼3.8739.14 ▲6.13
Add New Post /wp-admin/post-new.php1,549 ▲1823.42 ▲0.25681.53 ▲33.3958.03 ▲7.47
Media Library /wp-admin/upload.php1,424 ▲244.18 ▼0.03111.21 ▲11.7546.17 ▲1.25
CSS Rules /wp-admin/edit.php?post_type=mc_rule1,0881.9832.0829.63
Create New /wp-admin/post-new.php?post_type=mc_rule2,1024.0179.8646.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=mc_rule
    • > Notice in wp-content/plugins/mobile-css/mc-includes/mc.functions.php+159
    Trying to get property 'post_type' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=mc_rule
    • > Notice in wp-content/plugins/mobile-css/mc-includes/mc.meta_box.php+64
    Undefined index: MC_noncename
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mc_rule
    • > Notice in wp-content/plugins/mobile-css/mc-includes/mc.meta_box.php+45
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=mc_rule
    • > Notice in wp-content/plugins/mobile-css/mc-includes/mc.functions.php+288
    Undefined index: readonly
    • > GET request to /wp-admin/post-new.php?post_type=mc_rule
    • > Notice in wp-content/plugins/mobile-css/mc-includes/mc.functions.php+293
    Undefined index: rowclass

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-css/mc-includes/mc.post_types.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-css/mc-includes/mc.post_types.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-css/mc-includes/mc.functions.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-css/mc-includes/mc.meta_box.php:19

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: iphone, mobile, android, ipad, tablet...

mobile-css/mobile-css.php Passed 13 tests

"Mobile CSS" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
A plugin to create special CSS rules for specific mobile instances.

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
Good job! No executable or dangerous file extensions detected929 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6310528929

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.79
Average class complexity120.00
▷ Minimum class complexity120.00
▷ Maximum class complexity120.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods931.03%
▷ Public methods2793.10%
▷ Protected methods00.00%
▷ Private methods26.90%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants110.00%
▷ Class constants990.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin