62% dc-forms

Code Review | Docscloud

WordPress plugin Docscloud scored62%from 54 tests.

About plugin

  • Plugin page: dc-forms
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2023
  • Latest release: Mar 21, 2023
  • Number of updates: 20
  • Update frequency: every 0.8 days
  • Top authors: docscloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /127 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Docscloud
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.35 ▼0.38
Dashboard /wp-admin3.32 ▲0.0158.79 ▲4.90
Posts /wp-admin/edit.php3.37 ▲0.0151.14 ▲0.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.36 ▼23.60
Media Library /wp-admin/upload.php3.24 ▲0.0134.57 ▼0.78
Form List /wp-admin/admin.php?page=formlist3.2630.48
Auth List /wp-admin/admin.php?page=authdetails3.2433.45
Docscloud /wp-admin/admin.php?page=myplugin3.1831.46
Add Auth Details /wp-admin/admin.php?page=addauth3.2433.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: 2 new tables, 6 new options
New tables
wp_dcforms
wp_docscloud
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Docscloud
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.69 ▲0.401.86 ▲0.2144.62 ▲0.16
Dashboard /wp-admin2,222 ▲455.50 ▼0.1588.01 ▼31.8074.12 ▲20.25
Posts /wp-admin/edit.php2,139 ▲392.12 ▲0.1537.48 ▼6.0132.99 ▼5.64
Add New Post /wp-admin/post-new.php1,559 ▲2423.64 ▲5.56664.55 ▲45.32159.90 ▲96.76
Media Library /wp-admin/upload.php1,439 ▲424.15 ▼0.14100.48 ▼11.3064.99 ▲16.61
Form List /wp-admin/admin.php?page=formlist8691.9925.8427.21
Auth List /wp-admin/admin.php?page=authdetails8612.1624.0429.60
Docscloud /wp-admin/admin.php?page=myplugin8212.0024.3723.63
Add Auth Details /wp-admin/admin.php?page=addauth8552.0027.0426.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 2 tables
    • wp_docscloud
    • wp_dcforms
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=addauth
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/dc-forms/addentry.php:35
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/dc-forms/displaylist.php on line 4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/dc-forms/viewformlist.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/dc-forms/viewformlist.php:106
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/dc-forms/displaylist.php:38
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/dc-forms/viewformlist.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/dc-forms/addentry.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=addauth
    • > Network (severe)
    wp-content/plugins/docsclouds/img/icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in dc-forms/assets to your readme.txt
You can look at the official readme.txt

dc-forms/docscloudplugin.php 92% from 13 tests

The main PHP script in "Docscloud" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dc-forms.php" instead of "docscloudplugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin285 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43926285

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png0.63KB0.52KB▼ 16.25%