84% lemin-cropped-captcha

Code Review | Lemin Cropped Captcha

WordPress plugin Lemin Cropped Captcha scored84%from 54 tests.

About plugin

  • Plugin page: lemin-cropped-cap...
  • Plugin version: 0.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 8, 2021
  • Latest release: Nov 18, 2022
  • Number of updates: 7
  • Update frequency: every 62.4 days
  • Top authors: leminnow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /475 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.14ms] Passed 4 tests

Analyzing server-side resources used by Lemin Cropped Captcha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.27 ▼6.90
Dashboard /wp-admin3.41 ▲0.1157.24 ▲3.91
Posts /wp-admin/edit.php3.52 ▲0.1752.30 ▼0.55
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.40 ▼9.01
Media Library /wp-admin/upload.php3.33 ▲0.1043.81 ▲7.40
Lemin Captcha /wp-admin/options-general.php?page=lm_options3.3037.34

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

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

Browser metrics Passed 4 tests

Lemin Cropped Captcha: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2514.25 ▲0.041.71 ▼0.5043.69 ▼0.67
Dashboard /wp-admin2,207 ▲305.66 ▲0.0888.39 ▼12.7242.26 ▼2.79
Posts /wp-admin/edit.php2,112 ▲121.99 ▲0.0338.27 ▲1.8335.96 ▲2.29
Add New Post /wp-admin/post-new.php1,540 ▲323.13 ▲4.82671.16 ▲22.5757.36 ▼7.75
Media Library /wp-admin/upload.php1,412 ▲124.17 ▼0.02100.31 ▼5.1044.24 ▼0.29
Lemin Captcha /wp-admin/options-general.php?page=lm_options8862.0323.2531.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/lemin-cropped-captcha/uninstall.php
    • > /wp-content/plugins/lemin-cropped-captcha/lemin-cropped-capthca.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: antispam, anti-spam, comment moderation, captcha, comments...

lemin-cropped-captcha/lemin-cropped-capthca.php 85% from 13 tests

The primary PHP file in "Lemin Cropped Captcha" version 0.0.9 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.1" instead of "5.2")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lemin-cropped-captcha.php" instead of "lemin-cropped-capthca.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin679 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37018668
CSS12011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.50
▷ Minimum class complexity2.00
▷ Maximum class complexity55.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants00.00%
▷ Class constants16100.00%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin