10% myclang-forms

Code Review | My Clang Subscribe Form

WordPress plugin My Clang Subscribe Form scored10%from 54 tests.

About plugin

  • Plugin page: myclang-forms
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2015
  • Latest release: Jul 15, 2016
  • Number of updates: 5
  • Update frequency: every 56.2 days
  • Top authors: job_castrop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Parse error in wp-content/plugins/myclang-forms/myclang.php+369
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.58ms] Passed 4 tests

Analyzing server-side resources used by My Clang Subscribe Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.38 ▼0.96
Dashboard /wp-admin3.31 ▲0.0048.39 ▲0.76
Posts /wp-admin/edit.php3.36 ▲0.0044.95 ▼5.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.57 ▼12.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▲2.88

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

My Clang Subscribe Form: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.68 ▼0.944.48 ▲2.8538.39 ▼2.02
Dashboard /wp-admin2,206 ▲185.86 ▲0.78106.48 ▼4.8940.00 ▼5.18
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0434.24 ▼7.0132.44 ▼2.92
Add New Post /wp-admin/post-new.php1,514 ▼017.67 ▲0.05691.62 ▲27.5958.53 ▲1.05
Media Library /wp-admin/upload.php1,391 ▲94.22 ▲0.0496.79 ▼5.6343.59 ▲1.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Cannot use 'float' as class name as it is reserved in wp-content/plugins/myclang-forms/clangapi.php on line 68
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/myclang-forms/myclang.php on line 369

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === myclang-forms === )
You can take inspiration from this readme.txt

myclang-forms/myclang.php 92% from 13 tests

The main file in "My Clang Subscribe Form" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("myclang-forms.php" instead of "myclang.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected3,265 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP233583,265

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.01
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes369
▷ Abstract classes00.00%
▷ Concrete classes369100.00%
▷ Final classes00.00%
Methods135
▷ Static methods10.74%
▷ Public methods135100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin