83% mobile-frame

Code Review | Mobile Frame

WordPress plugin Mobile Frame scored83%from 54 tests.

About plugin

  • Plugin page: mobile-frame
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0+
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Apr 17, 2015
  • Number of updates: 6
  • Update frequency: every 24.5 days
  • Top authors: toledoroy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,262 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
Install script ran successfully

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

This is a short check of server-side resources used by Mobile Frame
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.62 ▲0.54
Dashboard /wp-admin3.33 ▼0.0244.94 ▼12.43
Posts /wp-admin/edit.php3.38 ▲0.0243.87 ▼6.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.29 ▼4.27
Media Library /wp-admin/upload.php3.25 ▲0.0233.54 ▼1.46

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

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

Browser metrics Passed 4 tests

Mobile Frame: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▲0.031.66 ▲0.0445.51 ▲2.01
Dashboard /wp-admin2,198 ▲215.62 ▲0.0481.09 ▼6.7038.04 ▼6.19
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0733.03 ▼8.7035.73 ▲1.14
Add New Post /wp-admin/post-new.php1,535 ▲718.26 ▼5.03641.34 ▼35.0468.26 ▼9.12
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.0293.07 ▼6.8540.98 ▼6.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_mobileframe
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mobile-frame/widget.php
    • > /wp-content/plugins/mobile-frame/shortcodes.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: photos, iphone, images, ipad, display...

mobile-frame/widget.php 85% from 13 tests

The principal PHP file in "Mobile Frame" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mobile-frame.php" instead of "widget.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected72 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3346954
CSS11018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.51MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/devices/iphone6.png42.26KB16.87KB▼ 60.08%
assets/devices/ipad1.png477.24KB238.38KB▼ 50.05%