84% wp-offline-fallback

Code Review | WP Offline Fallback

WordPress plugin WP Offline Fallback scored84%from 54 tests.

About plugin

  • Plugin page: wp-offline-fallback
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Nov 27, 2016
  • Latest release: Dec 7, 2016
  • Number of updates: 9
  • Update frequency: every 0.9 days
  • Top authors: nguyenvanduocit (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /4,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.16MB] [CPU: ▼15.62ms] Passed 4 tests

Analyzing server-side resources used by WP Offline Fallback
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.51 ▼1.62
Dashboard /wp-admin3.22 ▼0.1332.38 ▼24.46
Posts /wp-admin/edit.php3.28 ▼0.0836.19 ▼7.46
Add New Post /wp-admin/post-new.php5.46 ▼0.4372.30 ▼25.79
Media Library /wp-admin/upload.php3.22 ▼0.0129.89 ▼4.76

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for WP Offline Fallback
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,459 ▼1,32712.27 ▼2.081.74 ▲0.0237.49 ▼3.80
Dashboard /wp-admin850 ▼1,3241.36 ▼4.2912.94 ▼74.3219.31 ▼19.76
Posts /wp-admin/edit.php861 ▼1,2211.33 ▼0.707.41 ▼28.0820.90 ▼16.50
Add New Post /wp-admin/post-new.php587 ▼9501.71 ▼16.4318.53 ▼595.587.95 ▼56.68
Media Library /wp-admin/upload.php746 ▼6571.71 ▼2.5219.30 ▼79.4319.34 ▼22.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/wp-offline-fallback/page-templates/offline-fallback.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-offline-fallback/wp-offline-fallback.php:40

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: service worker, plugins, errors, offline

wp-offline-fallback/wp-offline-fallback.php Passed 13 tests

"WP Offline Fallback" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
112 characters long description:
Help you to show a message to the visitor when they visit your website without the internet. Yes, it's possible.

Code Analysis Passed 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 plugin156 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21725115
JavaScript24041

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin