79% mobble

Code Review | mobble

WordPress plugin mobble scored79%from 54 tests.

About plugin

  • Plugin page: mobble
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Feb 24, 2011
  • Latest release: Dec 19, 2016
  • Number of updates: 19
  • Update frequency: every 111.8 days
  • Top authors: scottsweb (57.89%)toggle (47.37%)

Code review

54 tests

User reviews

44 reviews

Install metrics

10,000+ active /109,046 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼6.86ms] Passed 4 tests

Server-side resources used by mobble
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2356.37 ▲18.81
Dashboard /wp-admin3.50 ▲0.1548.45 ▼7.13
Posts /wp-admin/edit.php3.61 ▲0.2547.61 ▲1.78
Add New Post /wp-admin/post-new.php6.08 ▲0.1990.44 ▼19.62
Media Library /wp-admin/upload.php3.42 ▲0.1934.70 ▼2.45
mobble /wp-admin/options-general.php?page=mobble/mobble.php3.3929.64

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
mobble_body_class
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by mobble
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.32 ▼0.051.99 ▲0.3343.71 ▲4.58
Dashboard /wp-admin2,199 ▲195.63 ▲0.0996.18 ▲8.0343.73 ▲1.23
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0334.97 ▼1.9835.63 ▼1.40
Add New Post /wp-admin/post-new.php1,529 ▲323.21 ▼0.22662.95 ▲18.6951.89 ▲0.15
Media Library /wp-admin/upload.php1,404 ▲44.18 ▲0.0193.90 ▼6.1041.74 ▼3.72
mobble /wp-admin/options-general.php?page=mobble/mobble.php8462.1824.1226.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/mobble/mobble.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=mobble/mobble.php
    • > Network (severe)
    https://button.flattr.com/loader.js?mode=auto - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: functions, mobile, css, queries, conditional...

mobble/mobble.php Passed 13 tests

The principal PHP file in "mobble" v. 1.6 is loaded by WordPress automatically on each request
125 characters long description:
Conditional functions for detecting a variety of mobile devices and tablets. For example is_android(), is_ios(), is_iphone().

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,117 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3247793908
PO File22020108
Markdown1340101

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods35
▷ Static methods925.71%
▷ Public methods3394.29%
▷ Protected methods25.71%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants325.00%
▷ Class constants975.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
scott.ee.png0.46KB0.46KB0.00%
toggle.png0.74KB0.49KB▼ 33.90%