58% wgpwpp

Code Review | WEDOS Global (CDN Cache & Security)

WordPress plugin WEDOS Global (CDN Cache & Security) scored58%from 54 tests.

About plugin

  • Plugin page: wgpwpp
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 26, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 12
  • Update frequency: every 4.9 days
  • Top authors: wedos (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /670 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.02MB] [CPU: ▲2.57ms] Passed 4 tests

An overview of server-side resources used by WEDOS Global (CDN Cache & Security)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.51 ▲1.0542.62 ▲1.07
Dashboard /wp-admin4.34 ▲0.9960.78 ▲2.00
Posts /wp-admin/edit.php4.39 ▲1.0352.50 ▲2.96
Add New Post /wp-admin/post-new.php6.92 ▲1.03100.34 ▲4.25
Media Library /wp-admin/upload.php4.26 ▲1.0342.54 ▲10.77

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

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

Browser metrics Passed 4 tests

WEDOS Global (CDN Cache & Security): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲1414.23 ▼0.091.70 ▼0.1740.15 ▼6.05
Dashboard /wp-admin2,209 ▲295.61 ▼0.0387.16 ▼2.9936.02 ▼6.64
Posts /wp-admin/edit.php2,112 ▲91.97 ▼0.0438.99 ▼1.4030.06 ▼3.79
Add New Post /wp-admin/post-new.php1,521 ▼823.33 ▲0.17596.98 ▲8.8166.48 ▲14.37
Media Library /wp-admin/upload.php1,414 ▲144.17 ▼0.0696.89 ▼2.6337.58 ▼2.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wgpwpp/uninstall.php+39
    Constant WGPWPP_VERSION already defined
  • The plugin did not uninstall successfully, leaving 141 files (0.98MB) in the plugin directory
    • (new file) admin/class-wgpwpp-admin-layout.php
    • (new file) README.md
    • (new file) admin/css/wgpwpp-admin.css
    • (new file) admin/class-wgpwpp-admin.php
    • (new file) README.txt
    • (new file) admin/class-wgpwpp-notices.php
    • (new file) admin/class-wgpwpp-notice.php
    • (new file) admin/class-wgpwpp-verification.php
    • (new file) admin/class-wgpwpp-authorization.php
    • (new file) LICENSE.txt
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wgpwpp/public/partials/wgpwpp-public-display.php
  • 34× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Runtime/Template.php on line 20
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Runtime/SnippetDriver.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'IPLib\\Range\\AbstractRange' not found in wp-content/plugins/wgpwpp/vendor/mlocati/ip-lib/src/Range/Subnet.php:17
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Compiler/HtmlNode.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Latte\\Macros\\MacroSet' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Macros/BlockMacros.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Latte\\TokenIterator' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Compiler/MacroTokens.php:16
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Compiler/Parser.php on line 16
    • > PHP Fatal error
      Uncaught Error: Interface 'Latte\\Loader' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Loaders/StringLoader.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'IPLib\\Range\\AbstractRange' not found in wp-content/plugins/wgpwpp/vendor/mlocati/ip-lib/src/Range/Single.php:17
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/wgpwpp/vendor/latte/latte/src/Latte/Compiler/MacroNode.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

wgpwpp/wgpwpp.php 92% from 13 tests

The entry point to "WEDOS Global (CDN Cache & Security)" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin15,709 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP953,2735,78011,459
PO File35367791,875
CSS51871241,444
Markdown42660555
JSON400301
JavaScript5176068
XML1117

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity23.38
▷ Minimum class complexity1.00
▷ Maximum class complexity225.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces14
Interfaces11
Traits1
Classes80
▷ Abstract classes22.50%
▷ Concrete classes7897.50%
▷ Final classes78.97%
Methods828
▷ Static methods14517.51%
▷ Public methods68482.61%
▷ Protected methods242.90%
▷ Private methods12014.49%
Functions68
▷ Named functions11.47%
▷ Anonymous functions6798.53%
Constants109
▷ Global constants00.00%
▷ Class constants109100.00%
▷ Public constants10697.25%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/wp-wgp/src/img/hourglass.png15.90KB7.19KB▼ 54.79%
admin/partials/wp-wgp/src/img/logo.png19.95KB9.51KB▼ 52.30%
admin/partials/wp-wgp/src/img/cosmonaut2.png19.95KB9.51KB▼ 52.30%
admin/partials/wp-wgp/src/img/rubber-ring.png16.37KB7.99KB▼ 51.20%
admin/partials/wp-wgp/src/img/ssl-certificate.png45.44KB16.65KB▼ 63.37%