10% mobile-cache

Code Review | Easy Cache

WordPress plugin Easy Cache scored 10% from 54 tests.

About plugin

  • Plugin page: mobile-cache
  • Plugin version: 1.60
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8
  • WordPress version: 6.3.1
  • First release: Nov 7, 2015
  • Latest release: Aug 1, 2017
  • Number of updates: 28
  • Update frequency: every 22.7 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 3,294 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/mobile-cache/EzOptions.php+480
    Methods with the same name as their class will not be constructors in a future version of PHP; EzMiniTab has a deprecated constructor

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.31ms] Passed 4 tests

Server-side resources used by Easy Cache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.12 ▲3.33
Dashboard /wp-admin3.45 ▲0.1444.28 ▼7.47
Posts /wp-admin/edit.php3.50 ▲0.1445.87 ▼1.37
Add New Post /wp-admin/post-new.php6.04 ▲0.1583.66 ▼16.00
Media Library /wp-admin/upload.php3.31 ▲0.0835.19 ▼0.40

Server storage [IO: ▲1.36MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • You have illegally modified 3 files (0.18KB) outside of "wp-content/plugins/mobile-cache/" and "wp-content/uploads/"
    • (new file) wp-content/easy-cache/others/index.php
    • (new file) wp-content/easy-cache/.htaccess
    • (new file) wp-content/easy-cache/mobile/index.php
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Easy Cache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.63 ▼1.021.67 ▼0.0740.01 ▼3.34
Dashboard /wp-admin2,210 ▲185.79 ▲0.8798.86 ▼23.0640.87 ▼5.00
Posts /wp-admin/edit.php2,097 ▲81.97 ▼0.0340.69 ▼2.8835.17 ▼0.24
Add New Post /wp-admin/post-new.php1,545 ▲2423.47 ▲0.13639.59 ▼49.3254.21 ▼2.22
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0795.64 ▼10.4442.52 ▼1.41
Easy Cache Lite /wp-admin/mobile-cache.php260.440.0813.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mobile-cache/info-divs.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mobile-cache/myPlugins.php:300
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-cache/MobileCacheBase.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobile-cache/MobileCacheBase.php on line 7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-cache/MobileCacheBase.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-cache/MobileCacheBase.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-cache/MobileCacheBase.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobile-cache/MobileCacheBase.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/mobile-cache.php
    • > Network (severe)
    wp-admin/mobile-cache.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (*Easy Cache* admin page, showing the simple, single-page, easy-to-understand settings.), #2 (*Easy Cache* Pro features, showing independent caching by target type (smart phones, tablets, desktop browsers) and CDN and RAM disk support.), #3 (My blog performance with no caching.), #4 (My blog with a fully-configured *Easy Cache* set up.)
The official readme.txt is a good inspiration

mobile-cache/mobile-cache.php 92% from 13 tests

The primary PHP file in "Easy Cache" version 1.60 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 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
Everything looks great! No dangerous files found in this plugin4,373 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP84611,0033,257
JavaScript1511341,116

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.79
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods170
▷ Static methods3420.00%
▷ Public methods16898.82%
▷ Protected methods21.18%
▷ Private methods00.00%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.85MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png176.29KB45.93KB▼ 73.94%
img/ezsupport.png3.13KB2.01KB▼ 35.75%
ezpaypal.png9.22KB3.44KB▼ 62.72%
screenshot-2.png142.89KB39.99KB▼ 72.01%
screenshot-4.png273.45KB74.78KB▼ 72.65%