78% fallback

Code Review | Fallback

WordPress plugin Fallback scored78%from 54 tests.

About plugin

  • Plugin page: fallback
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Dec 29, 2020
  • Latest release: Jan 10, 2021
  • Number of updates: 6
  • Update frequency: every 2.7 days
  • Top authors: stajan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /515 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.79MB] [CPU: ▲4.84ms] Passed 4 tests

Analyzing server-side resources used by Fallback
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8447.33 ▲8.92
Dashboard /wp-admin4.13 ▲0.8357.39 ▲8.24
Posts /wp-admin/edit.php4.18 ▲0.8351.69 ▲4.49
Add New Post /wp-admin/post-new.php6.65 ▲0.7689.23 ▼2.31
Media Library /wp-admin/upload.php3.99 ▲0.7646.09 ▲14.02

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

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

Browser metrics Passed 4 tests

Fallback: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.35 ▲0.041.95 ▲0.0543.73 ▲0.15
Dashboard /wp-admin2,202 ▲225.63 ▼0.0292.32 ▼2.0141.38 ▲0.64
Posts /wp-admin/edit.php2,104 ▲11.96 ▲0.0134.71 ▼4.1934.06 ▲0.44
Add New Post /wp-admin/post-new.php1,531 ▲323.49 ▲0.55671.02 ▲2.2748.89 ▼4.36
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.09106.67 ▲1.1946.23 ▲3.85
Fallback /wp-admin/wordpress-fallback.php260.420.1014.29

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 72× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\WriterInterface' not found in wp-content/plugins/fallback/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/fallback/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/fallback/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/fallback/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Parser\\ParserInterface' not found in wp-content/plugins/fallback/vendor/vlucas/phpdotenv/src/Parser/Parser.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/fallback/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/fallback/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Store\\StoreInterface' not found in wp-content/plugins/fallback/vendor/vlucas/phpdotenv/src/Store/FileStore.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/fallback/vendor/guzzlehttp/psr7/src/PumpStream.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/fallback/vendor/psr/http-client/src/NetworkExceptionInterface.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/wordpress-fallback.php
    • > Network (severe)
    wp-admin/wordpress-fallback.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please a description for screenshot #1 in fallback/assets to your readme.txt
You can look at the official readme.txt

fallback/wordpress-fallback.php 85% from 13 tests

Analyzing the main PHP file in "Fallback" version 1.0.2
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fallback.php" instead of "wordpress-fallback.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin18,863 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP1622,6017,56614,108
Markdown161,09703,395
JSON14001,232
XML200103
make211025

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity10.85
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces23
Interfaces28
Traits3
Classes111
▷ Abstract classes21.80%
▷ Concrete classes10998.20%
▷ Final classes4944.95%
Methods1,006
▷ Static methods20420.28%
▷ Public methods83482.90%
▷ Protected methods100.99%
▷ Private methods16216.10%
Functions246
▷ Named functions11145.12%
▷ Anonymous functions13554.88%
Constants71
▷ Global constants57.04%
▷ Class constants6692.96%
▷ Public constants5684.85%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin