78% jcwp-capslock-detection

Code Review | jcwp capslock detection

WordPress plugin jcwp capslock detection scored 78% from 54 tests.

About plugin

  • Plugin page: jcwp-capslock-det...
  • Plugin version: 1.09
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2
  • WordPress version: 5.8.1
  • First release: Jul 5, 2012
  • Latest release: Apr 15, 2015
  • Number of updates: 4
  • Update frequency: every 253.5 days
  • Top authors: jaschahal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 861 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼138.76ms] Passed 4 tests

A check of server-side resources used by jcwp capslock detection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0549.95 ▲11.16
Dashboard /wp-admin3.11 ▲0.0549.40 ▲2.92
Posts /wp-admin/edit.php3.16 ▲0.0549.50 ▲4.86
Add New Post /wp-admin/post-new.php5.47 ▲0.0390.25 ▼559.05
Media Library /wp-admin/upload.php3.05 ▲0.0532.93 ▼3.75
JCWP CapsLock Detection /wp-admin/options-general.php?page=jcorgcld-plugin3.0028.20

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
jcorgcld_linkback
jcorgcld_fade
jcorgcld_html
jcorgcld_position
jcorgcld_active
jcorgcld_opacity
jcorgcld_fallback
jcorgcld_offset

Browser metrics Passed 4 tests

A check of browser resources used by jcwp capslock detection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲23916.18 ▲0.6211.75 ▲3.5654.16 ▲6.85
Dashboard /wp-admin2,982 ▲515.88 ▼0.05143.13 ▼14.10114.62 ▼4.08
Posts /wp-admin/edit.php2,748 ▲92.69 ▲0.0170.87 ▲2.3690.51 ▼5.96
Add New Post /wp-admin/post-new.php1,689 ▲9818.60 ▼0.19370.62 ▼26.43107.73 ▼11.36
Media Library /wp-admin/upload.php1,816 ▲95.03 ▲0.03159.60 ▼9.36126.15 ▲4.11
JCWP CapsLock Detection /wp-admin/options-general.php?page=jcorgcld-plugin1,3792.1061.2994.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • jcorgcld_linkback
    • jcorgcld_fallback
    • jcorgcld_opacity
    • jcorgcld_offset
    • jcorgcld_html
    • jcorgcld_active
    • jcorgcld_fade
    • jcorgcld_position

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=jcorgcld-plugin
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=jcorgcld-plugin
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/jcwp-capslock-detection/jcwp-capslock-detection.php:24

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (A screen shot of the options page), #2 (Shows a style at the bottom of the page)
  • Plugin Name: Please specify the plugin name on the first line ( === jcwp-capslock-detection === )
The official readme.txt is a good inspiration

jcwp-capslock-detection/jcwp-capslock-detection.php Passed 13 tests

The entry point to "jcwp capslock detection" version 1.09 is a PHP file that has certain tags in its header comment area
101 characters long description:
This plugin shows a tooltip when user's have their CAPS lock on while typing their password to login.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin445 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11616229
JavaScript13923199
CSS10017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions8
▷ Named functions8100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png20.66KB8.00KB▼ 61.28%
screenshot-1.png29.57KB11.81KB▼ 60.07%