84% cf-preview-fix

Code Review | CF Preview Fix

WordPress plugin CF Preview Fix scored84%from 54 tests.

About plugin

  • Plugin page: cf-preview-fix
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2016
  • Latest release: Sep 20, 2016
  • Number of updates: 4
  • Update frequency: every 37.5 days
  • Top authors: hideokamoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.75ms] Passed 4 tests

An overview of server-side resources used by CF Preview Fix
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.03 ▼1.97
Dashboard /wp-admin3.32 ▼0.0245.64 ▼12.02
Posts /wp-admin/edit.php3.37 ▲0.0249.67 ▲1.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.94 ▼10.90
Media Library /wp-admin/upload.php3.25 ▲0.0235.49 ▲2.42

Server storage [IO: ▲0.04MB] [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: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CF Preview Fix
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.67 ▼0.711.77 ▼0.2943.09 ▲0.94
Dashboard /wp-admin2,206 ▲185.83 ▼0.02102.05 ▼14.4740.75 ▼2.43
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0538.67 ▼3.4134.88 ▼1.44
Add New Post /wp-admin/post-new.php1,533 ▲1923.27 ▲5.85662.89 ▼35.2361.41 ▲6.50
Media Library /wp-admin/upload.php1,382 ▼34.21 ▼0.0299.25 ▼0.5639.62 ▼5.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf-preview-fix/cf-preview-fix.php:10

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: cloudfront

cf-preview-fix/cf-preview-fix.php Passed 13 tests

"CF Preview Fix" version 0.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
29 characters long description:
Fix CloudFront Preview Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin62 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110862

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin