78% fade-to-focus

Code Review | Fade to Focus

WordPress plugin Fade to Focus scored78%from 54 tests.

About plugin

  • Plugin page: fade-to-focus
  • Plugin version: 1.03
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1+
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Oct 27, 2014
  • Number of updates: 9
  • Update frequency: every 5.3 days
  • Top authors: daverage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by Fade to Focus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.57 ▼4.61
Dashboard /wp-admin3.31 ▼0.0444.84 ▼17.78
Posts /wp-admin/edit.php3.36 ▲0.0045.13 ▼2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.07 ▼23.30
Media Library /wp-admin/upload.php3.23 ▲0.0030.46 ▼4.38

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Fade to Focus: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.87 ▼0.511.80 ▼0.2345.61 ▲2.69
Dashboard /wp-admin2,212 ▲245.79 ▼0.0694.28 ▼21.7939.53 ▼6.31
Posts /wp-admin/edit.php2,101 ▲122.00 ▼0.0435.19 ▼0.5234.89 ▲2.52
Add New Post /wp-admin/post-new.php1,425 ▼11717.00 ▼1.22558.11 ▼88.8545.93 ▼9.08
Media Library /wp-admin/upload.php1,397 ▲64.15 ▼0.0694.37 ▼4.6939.74 ▼5.35

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/fade-to-focus/fadefocus.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/fade-to-focus/options.php on line 48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Tested up to: Invalid version format
You can look at the official readme.txt

fade-to-focus/fadefocus.php 92% from 13 tests

This is the main PHP file of "Fade to Focus" version 1.03, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("fade-to-focus.php" instead of "fadefocus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131573
JavaScript113053

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/controls.png2.22KB1.88KB▼ 15.38%