73% flashspeed

Code Review | FlashSpeed

WordPress plugin FlashSpeed scored 73% from 54 tests.

About plugin

  • Plugin page: flashspeed
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2022
  • Latest release: Sep 4, 2023
  • Number of updates: 12
  • Update frequency: every 35.8 days
  • Top authors: skyminds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 479 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.10MB] [CPU: ▲27.91ms] 75% from 4 tests

Analyzing server-side resources used by FlashSpeed
Please fix the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.10MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4272.30 ▲30.76
Dashboard /wp-admin8.90 ▲5.5981.34 ▲29.49
Posts /wp-admin/edit.php8.91 ▲5.5585.82 ▲29.57
Add New Post /wp-admin/post-new.php9.71 ▲3.82125.17 ▲21.83
Media Library /wp-admin/upload.php8.90 ▲5.6773.11 ▲35.05
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9063.72

Server storage [IO: ▲3.40MB] [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: 351 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
fs_active_plugins
fs_debug_mode
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by FlashSpeed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5013.29 ▼0.014.66 ▲2.9529.47 ▼13.31
Dashboard /wp-admin2,245 ▲395.88 ▼0.00108.63 ▲6.1648.25 ▲8.75
Posts /wp-admin/edit.php2,125 ▲332.05 ▲0.0236.42 ▼3.0038.42 ▲3.38
Add New Post /wp-admin/post-new.php1,532 ▼117.42 ▼5.65786.09 ▲182.0456.25 ▲2.13
Media Library /wp-admin/upload.php1,427 ▲364.22 ▲0.0397.56 ▼2.3244.73 ▲1.61
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0711.7225.8430.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/flashspeed/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • fs_accounts
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_recent-posts
    • fs_active_plugins

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 102× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/flashspeed/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: assets, utopique, flashspeed, analytics, flash speed...

flashspeed/flashspeed.php 92% from 13 tests

This is the main PHP file of "FlashSpeed" version 2.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin40,343 lines of code in 292 files:
LanguageFilesBlank linesComment linesLines of code
PHP2548,94419,64938,329
CSS1614562620
JSON700587
JavaScript76098394
Markdown41140274
YAML3313123
XML13016

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity30.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes162
▷ Abstract classes31.85%
▷ Concrete classes15998.15%
▷ Final classes00.00%
Methods1,478
▷ Static methods24416.51%
▷ Public methods1,03770.16%
▷ Protected methods553.72%
▷ Private methods38626.12%
Functions200
▷ Named functions18894.00%
▷ Anonymous functions126.00%
Constants184
▷ Global constants13271.74%
▷ Class constants5228.26%
▷ Public constants52100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%