78% contact-form-counter

Code Review | Contact Form Counter

WordPress plugin Contact Form Counter scored78%from 54 tests.

About plugin

  • Plugin page: contact-form-counter
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 12, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 8
  • Update frequency: every 51.6 days
  • Top authors: storepro (50%)saliya22 (37.5%)suhanastorepro (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /550 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.00MB] [CPU: ▼2.97ms] Passed 4 tests

An overview of server-side resources used by Contact Form Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.43 ▼15.11
Dashboard /wp-admin3.31 ▲0.0044.56 ▼0.02
Posts /wp-admin/edit.php3.36 ▲0.0045.46 ▲2.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.40 ▲3.39
Media Library /wp-admin/upload.php3.23 ▲0.0034.33 ▲1.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form Counter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.56 ▼0.002.19 ▲0.0737.80 ▼17.17
Dashboard /wp-admin2,195 ▲185.53 ▼0.0482.13 ▼7.0435.36 ▼3.03
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0335.39 ▲1.7732.25 ▼6.17
Add New Post /wp-admin/post-new.php1,526 ▼1123.09 ▲4.99720.21 ▲97.5166.47 ▼1.44
Media Library /wp-admin/upload.php1,394 ▼64.18 ▲0.0694.93 ▼2.9440.38 ▼4.23

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/contact-form-counter/contact-form-counter.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-counter/includes/contact-list_table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-counter/includes/contact-list_table.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-counter/includes/contact-list_table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: counter, contact form, serial, serial number

contact-form-counter/contact-form-counter.php 92% from 13 tests

The main PHP file in "Contact Form Counter" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected484 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP415539409
CSS112052
JavaScript2231423

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity28.50
▷ Minimum class complexity8.00
▷ Maximum class complexity49.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin