84% cf7-ace-syntax-highlighting

Code Review | Contact Form 7 Syntax Highlighting

WordPress plugin Contact Form 7 Syntax Highlighting scored84%from 54 tests.

About plugin

  • Plugin page: cf7-ace-syntax-hi...
  • Plugin version: 0.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: May 19, 2020
  • Number of updates: 17
  • Update frequency: every 89.2 days
  • Top authors: jorisvanmontfort (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /5,408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Contact Form 7 Syntax Highlighting
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.36 ▲0.30
Dashboard /wp-admin3.31 ▼0.0446.95 ▼11.25
Posts /wp-admin/edit.php3.36 ▲0.0046.95 ▼0.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0089.66 ▼7.25
Media Library /wp-admin/upload.php3.24 ▲0.0033.01 ▲0.53

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

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

Browser metrics Passed 4 tests

Contact Form 7 Syntax Highlighting: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.28 ▼0.011.99 ▲0.2749.14 ▲8.24
Dashboard /wp-admin2,198 ▲205.64 ▲0.0385.28 ▼15.2537.81 ▼5.85
Posts /wp-admin/edit.php2,082 ▼212.02 ▲0.0435.16 ▼5.8435.75 ▼3.49
Add New Post /wp-admin/post-new.php1,535 ▲418.26 ▼4.75607.00 ▼88.5071.01 ▲7.96
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.2497.22 ▼4.6640.05 ▼6.05

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_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-ace-syntax-highlighting/contact-form-7-ace-syntax.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: contact form 7, ace, syntax highlighting, form textarea, contact form 7 html editor...

cf7-ace-syntax-highlighting/contact-form-7-ace-syntax.php 92% from 13 tests

The entry point to "Contact Form 7 Syntax Highlighting" version 0.2.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-ace-syntax-highlighting.php" instead of "contact-form-7-ace-syntax.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected78 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4171467
PHP12911

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.75
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%
Functions1
▷ Named functions1100.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
No PNG files were detected