84% cf7-multi-upload-file

Code Review | CF7 Multi Upload File

WordPress plugin CF7 Multi Upload File scored84%from 54 tests.

About plugin

  • Plugin page: cf7-multi-upload-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2019
  • Latest release: Jan 1, 2020
  • Number of updates: 16
  • Update frequency: every 10.6 days
  • Top authors: iduid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼8.14ms] Passed 4 tests

This is a short check of server-side resources used by CF7 Multi Upload File
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.05 ▼3.29
Dashboard /wp-admin3.32 ▼0.0244.52 ▼16.96
Posts /wp-admin/edit.php3.37 ▲0.0243.98 ▲0.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.48 ▼13.23
Media Library /wp-admin/upload.php3.24 ▲0.0233.71 ▲1.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CF7 Multi Upload File
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.65 ▲0.061.75 ▼0.0039.70 ▼4.24
Dashboard /wp-admin2,206 ▲184.88 ▼0.04107.90 ▼7.3938.76 ▼7.13
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0339.39 ▲3.5835.86 ▲1.09
Add New Post /wp-admin/post-new.php1,542 ▲2318.27 ▼4.83596.12 ▼67.2863.61 ▲6.26
Media Library /wp-admin/upload.php1,385 ▼34.30 ▲0.0892.82 ▼3.0240.63 ▲0.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cf7-multi-upload-file/index.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

cf7-multi-upload-file/index.php 92% from 13 tests

The entry point to "CF7 Multi Upload File" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-multi-upload-file.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin453 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1737306
CSS121065
PO File1161661
JavaScript110721

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected