94% cf7-show-page

Code Review | Contact Form 7 - Show Page

WordPress plugin Contact Form 7 - Show Page scored 94% from 54 tests.

About plugin

  • Plugin page: cf7-show-page
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 5.8.1
  • First release: Jun 22, 2017
  • Latest release: Dec 4, 2018
  • Number of updates: 7
  • Update frequency: every 75.7 days
  • Top authors: sachyya sachet (100%)Otto42 (28.57%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 1,867 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.41MB] [CPU: ▼136.57ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 - Show Page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.19 ▲0.4747.39 ▲24.41
Dashboard /wp-admin3.50 ▲0.4452.86 ▲9.66
Posts /wp-admin/edit.php3.55 ▲0.4451.67 ▲3.67
Add New Post /wp-admin/post-new.php5.80 ▲0.36100.67 ▼563.65
Media Library /wp-admin/upload.php3.38 ▲0.3840.23 ▲4.06
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.4534.50

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 - Show Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,720 ▲12416.17 ▲0.589.58 ▼2.9648.82 ▼10.94
Dashboard /wp-admin3,028 ▲915.98 ▲0.03155.51 ▼15.68121.46 ▲0.81
Posts /wp-admin/edit.php2,793 ▲542.74 ▲0.0376.80 ▲0.12101.65 ▲2.78
Add New Post /wp-admin/post-new.php1,714 ▲3118.81 ▲2.12414.27 ▼20.98112.79 ▲6.54
Media Library /wp-admin/upload.php1,859 ▲525.07 ▲0.06152.69 ▼3.17136.63 ▲16.54
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,2832.1160.1478.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/cf7-show-page/contact-form-7-show-page.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/cf7-show-page/tgmpa/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/cf7-show-page/tgmpa/class-tgm-plugin-activation.php:2109

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

cf7-show-page/contact-form-7-show-page.php 92% from 13 tests

The entry point to "Contact Form 7 - Show Page" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-show-page.php" instead of "contact-form-7-show-page.php")

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
There were no executable files found in this plugin2,305 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35261,7911,988
Markdown1580281
CSS11036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity48.14
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods54.95%
▷ Public methods7877.23%
▷ Protected methods2322.77%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
PNG images were not found in this plugin