88% admin-side-data-storage-for-contact-form-7

Code Review | Admin side data storage for Contact Form 7

WordPress plugin Admin side data storage for Contact Form 7 scored 88% from 54 tests.

About plugin

  • Plugin page: admin-side-data-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Dec 21, 2021
  • Latest release: Dec 21, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: zestardtechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 77 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼291.92ms] Passed 4 tests

Analyzing server-side resources used by Admin side data storage for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.05 ▲5.92
Dashboard /wp-admin3.41 ▲0.0034.44 ▲0.53
Posts /wp-admin/edit.php3.65 ▲0.0038.13 ▲3.50
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.09 ▼1,171.06
Media Library /wp-admin/upload.php3.30 ▲0.0024.14 ▼0.63
ASDS CF7 /wp-admin/admin.php?page=zt-dcfcf-list3.1018.19
Settings /wp-admin/admin.php?page=zt-dcfcf-settings3.1018.15

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin side data storage for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,814 ▲9215.56 ▼0.156.18 ▲0.182.05 ▼0.05
Dashboard /wp-admin2,881 ▲236.19 ▲0.04118.21 ▼20.04151.86 ▼10.29
Posts /wp-admin/edit.php2,688 ▼33.23 ▼0.0167.14 ▲3.15141.04 ▼0.48
Add New Post /wp-admin/post-new.php1,661 ▼016.50 ▲0.18430.48 ▲16.70150.39 ▼17.84
Media Library /wp-admin/upload.php1,698 ▼05.51 ▲0.02147.09 ▲4.51188.28 ▲1.96
ASDS CF7 /wp-admin/admin.php?page=zt-dcfcf-list280.940.0416.61
Settings /wp-admin/admin.php?page=zt-dcfcf-settings280.940.0317.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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/admin-side-data-storage-for-contact-form-7/inc/admin/class.wp.list.table.php on line 4
    • > 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/admin-side-data-storage-for-contact-form-7/inc/admin/class.wp.list.table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/admin-side-data-storage-for-contact-form-7/inc/admin/inc/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/admin-side-data-storage-for-contact-form-7/inc/admin/assets/fpdf/exfpdf.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-side-data-storage-for-contact-form-7/inc/admin/class.wp.list.table.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=zt-dcfcf-list
    • > Network (severe)
    wp-admin/admin.php?page=zt-dcfcf-list - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=zt-dcfcf-settings
    • > Network (severe)
    wp-admin/admin.php?page=zt-dcfcf-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

admin-side-data-storage-for-contact-form-7/asds-cf7.php 85% from 13 tests

"Admin side data storage for Contact Form 7" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-side-data-storage-for-contact-form-7.php" instead of "asds-cf7.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected6,446 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP325255025,648
Markdown13580594
CSS2458129
JavaScript18075

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity88.25
▷ Minimum class complexity1.00
▷ Maximum class complexity337.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods210
▷ Static methods125.71%
▷ Public methods13463.81%
▷ Protected methods5224.76%
▷ Private methods2411.43%
Functions14
▷ Named functions642.86%
▷ Anonymous functions857.14%
Constants17
▷ Global constants1058.82%
▷ Class constants741.18%
▷ Public constants7100.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