84% focusable

Code Review | Focusable

WordPress plugin Focusable scored84%from 54 tests.

About plugin

  • Plugin page: focusable
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.7.1
  • WordPress version: 6.3.1
  • First release: May 5, 2021
  • Latest release: Jun 2, 2021
  • Number of updates: 4
  • Update frequency: every 7.0 days
  • Top authors: zarhasan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /408 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.24MB] [CPU: ▼13.04ms] Passed 4 tests

A check of server-side resources used by Focusable
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2342.77 ▲3.10
Dashboard /wp-admin3.61 ▲0.2644.02 ▼27.27
Posts /wp-admin/edit.php3.66 ▲0.3044.41 ▼3.88
Add New Post /wp-admin/post-new.php6.13 ▲0.2483.25 ▼17.80
Media Library /wp-admin/upload.php3.47 ▲0.2433.97 ▼3.22

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 98 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Focusable
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,375 ▲62914.12 ▼0.2451.14 ▲49.5249.63 ▲7.44
Dashboard /wp-admin2,209 ▲325.56 ▼0.0586.06 ▼17.8969.61 ▲25.36
Posts /wp-admin/edit.php2,114 ▲111.98 ▼0.1334.83 ▼8.4832.28 ▼3.17
Add New Post /wp-admin/post-new.php1,546 ▲1823.03 ▼0.11685.12 ▲15.4158.26 ▼6.47
Media Library /wp-admin/upload.php1,420 ▲174.21 ▲0.03102.54 ▲0.6371.16 ▲27.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/focusable/views/admin/index.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: focus outline, accessibility, keyboard navigation

focusable/focusable.php Passed 13 tests

The primary PHP file in "Focusable" version 1.3.0 is used by WordPress to initiate all plugin functionality
87 characters long description:
This plugin displays a ring on the focusable elements when navigating through keyboard.

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
There were no executable files found in this plugin14,244 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript342,4222,12610,613
HTML4390381,714
PHP173034961,018
CSS6109192702
Sass45088
JSON40062
Markdown222043
SVG1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.14
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods76
▷ Static methods810.53%
▷ Public methods7396.05%
▷ Protected methods00.00%
▷ Private methods33.95%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.13KB0.18KB0.00%
assets/icon-128x128.png2.01KB0.89KB▼ 55.87%
assets/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png2.12KB1.93KB▼ 8.95%
assets/vendor/jquery-timepicker/include/ui-1.10.0/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.17KB0.08KB▼ 51.12%
assets/dist/images/icon.png0.38KB0.24KB▼ 36.20%