84% edd-mobile

Code Review | EDD Mobile

WordPress plugin EDD Mobile scored84%from 54 tests.

About plugin

  • Plugin page: edd-mobile
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Apr 3, 2013
  • Latest release: Dec 27, 2013
  • Number of updates: 15
  • Update frequency: every 17.9 days
  • Top authors: modemlooper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,548 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: ▼0.59ms] Passed 4 tests

A check of server-side resources used by EDD Mobile
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.95 ▲1.41
Dashboard /wp-admin3.32 ▲0.0252.46 ▲7.79
Posts /wp-admin/edit.php3.37 ▲0.0247.64 ▼0.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.77 ▼6.99
Media Library /wp-admin/upload.php3.24 ▲0.0137.36 ▲3.57
EDD Mobile /wp-admin/options-general.php?page=edd-mobile-settings3.2130.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for EDD Mobile
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.75 ▼0.021.95 ▲0.1043.97 ▼4.22
Dashboard /wp-admin2,219 ▲314.83 ▼1.07101.31 ▼1.1237.55 ▼7.64
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0439.05 ▲2.8636.44 ▲0.71
Add New Post /wp-admin/post-new.php1,547 ▲1423.30 ▲0.01666.16 ▲2.4855.73 ▼9.87
Media Library /wp-admin/upload.php1,404 ▲194.24 ▲0.01106.03 ▲5.9046.35 ▲2.45
EDD Mobile /wp-admin/options-general.php?page=edd-mobile-settings9482.3940.1226.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/edd-mobile/includes/edd-mobile-admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/edd-mobile/loader.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/edd-mobile/themes/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/edd-mobile/includes/edd-mobile-functions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
3 plugin tags: edd, mobile, easy digital downloads

edd-mobile/loader.php 92% from 13 tests

"EDD Mobile" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("edd-mobile.php" instead of "loader.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
Good job! No executable or dangerous file extensions detected2,519 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5350681,103
CSS1201141,029
PHP412041258
PO File24789129

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.65MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/img/startup@2x.png252.70KB19.91KB▼ 92.12%
themes/img/startup@5.png337.99KB22.58KB▼ 93.32%
themes/img/reload.png2.69KB2.39KB▼ 11.06%
themes/img/arrow.png0.45KB0.27KB▼ 40.13%
themes/img/icon.png7.76KB3.55KB▼ 54.29%