84% wp-optimize-speed-by-xtraffic

Code Review | WP Optimize Speed By xTraffic

WordPress plugin WP Optimize Speed By xTraffic scored84%from 54 tests.

About plugin

  • Plugin page: wp-optimize-speed...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.4
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Jan 21, 2016
  • Number of updates: 13
  • Update frequency: every 19.5 days
  • Top authors: pep.vn (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /29,720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.61ms] Passed 4 tests

This is a short check of server-side resources used by WP Optimize Speed By xTraffic
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.55 ▲0.29
Dashboard /wp-admin3.37 ▲0.0646.15 ▼3.05
Posts /wp-admin/edit.php3.48 ▲0.1250.47 ▲5.05
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.89 ▼14.24
Media Library /wp-admin/upload.php3.29 ▲0.0633.38 ▼1.44

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WP Optimize Speed By xTraffic: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.26 ▼1.121.77 ▼0.0142.75 ▼3.48
Dashboard /wp-admin2,225 ▲404.85 ▼1.11112.85 ▲5.6847.30 ▲4.47
Posts /wp-admin/edit.php2,107 ▲151.99 ▼0.0346.25 ▲12.2354.50 ▲20.89
Add New Post /wp-admin/post-new.php1,552 ▲1823.10 ▼0.00682.54 ▲13.6052.97 ▼4.47
Media Library /wp-admin/upload.php1,410 ▲224.22 ▼0.0396.34 ▼17.8944.82 ▼1.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_OPTIMIZE_SPEED_BY_XTRAFFIC_PLUGIN_NAME - assumed 'WP_OPTIMIZE_SPEED_BY_XTRAFFIC_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/views/optimizeSpeed/index.php on line 100
    • > PHP Fatal error
      Uncaught Error: Class 'WPOptimizeSpeedByxTraffic\\Application\\Module\\Backend\\Controller\\ControllerBase' not found in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/Controller/OptimizeSpeedController.php:12
    • > PHP Notice
      Undefined variable: di in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/configs/service.php on line 9
    • > PHP Notice
      Undefined variable: di in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/configs/service.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'WpPepVN\\Mvc\\Module' not found in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Frontend/Module.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function render() on null in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/views/optimizeSpeed/index.php:153
    • > PHP Fatal error
      Uncaught Error: Class 'WpPepVN\\Form\\Form' not found in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/Form/OptimizeSpeedOptionsForm.php:20
    • > PHP Notice
      Undefined variable: webServerSoftwareName in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/views/optimizeSpeed/index.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WpPepVN\\Mvc\\Module' not found in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Backend/Module.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function get() on null in wp-content/plugins/wp-optimize-speed-by-xtraffic/Application/Module/Frontend/configs/service.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 (18 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-optimize-speed-by-xtraffic/wp-optimize-speed-by-xtraffic.php Passed 13 tests

The main PHP script in "WP Optimize Speed By xTraffic" version 1.1.5 is automatically included on every request by WordPress
65 characters long description:
Plugin speeds up your website runs faster and better performance.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected9,135 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP463,2081,2149,133
JavaScript2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity53.27
▷ Minimum class complexity1.00
▷ Maximum class complexity213.00
Average method complexity6.85
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods296
▷ Static methods3010.14%
▷ Public methods22877.03%
▷ Protected methods41.35%
▷ Private methods6421.62%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants36
▷ Global constants1952.78%
▷ Class constants1747.22%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin