83% yonox-contact-form-7-db

Code Review | Yonox CF7 DB

WordPress plugin Yonox CF7 DB scored83%from 54 tests.

About plugin

  • Plugin page: yonox-contact-for...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2019
  • Latest release: Oct 4, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: yonox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Yonox CF7 DB
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.12 ▼4.73
Dashboard /wp-admin3.31 ▼0.0450.10 ▼15.76
Posts /wp-admin/edit.php3.36 ▲0.0047.11 ▲1.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.03 ▼18.74
Media Library /wp-admin/upload.php3.23 ▲0.0036.05 ▲1.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Yonox CF7 DB
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.371.72 ▲0.0743.69 ▲2.70
Dashboard /wp-admin2,189 ▲125.55 ▼0.1095.09 ▲7.5644.05 ▲1.00
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0134.97 ▼4.0936.94 ▲0.16
Add New Post /wp-admin/post-new.php1,526 ▼023.27 ▼0.37634.13 ▼58.5051.06 ▲3.94
Media Library /wp-admin/upload.php1,397 ▼34.22 ▲0.05105.91 ▼6.0444.04 ▼3.05

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 74× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\Exception\\ReaderException' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Reader/Exception/NoSheetsFoundException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\ReaderAbstract' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Reader/ODS/Reader.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Creator\\HelperFactory' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Reader/ODS/Creator/HelperFactory.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Exception\\SpoutException' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Common/Exception/IOException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\ReaderAbstract' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Reader/CSV/Reader.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Creator\\HelperFactory' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Writer/ODS/Creator/HelperFactory.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\Exception\\ReaderException' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Reader/Exception/InvalidValueException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Writer\\Common\\Manager\\WorksheetManagerInterface' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Writer/XLSX/Manager/WorksheetManager.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Writer\\Common\\Manager\\WorksheetManagerInterface' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Writer/ODS/Manager/WorksheetManager.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\SheetInterface' not found in wp-content/plugins/yonox-contact-form-7-db/Spout/Reader/XLSX/Sheet.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt is a good inspiration

yonox-contact-form-7-db/yonox-cf7-db.php 85% from 13 tests

The principal PHP file in "Yonox CF7 DB" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("yonox-contact-form-7-db.php" instead of "yonox-cf7-db.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin14,374 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PHP1512,2655,9638,064
SVG4034,164
CSS73935916
JSON4000684
JavaScript35364546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.73
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces49
Interfaces14
Traits1
Classes130
▷ Abstract classes118.46%
▷ Concrete classes11991.54%
▷ Final classes00.00%
Methods801
▷ Static methods526.49%
▷ Public methods53967.29%
▷ Protected methods17822.22%
▷ Private methods8410.49%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants218
▷ Global constants62.75%
▷ Class constants21297.25%
▷ Public constants212100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 1.48MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screenshot-3.png161.05KB50.22KB▼ 68.82%
assets/img/icon-20x20.png0.80KB1.14KB0.00%
assets/img/screenshot-2.png123.71KB45.60KB▼ 63.13%
assets/img/banner-1544x500.png857.25KB262.54KB▼ 69.37%
assets/img/icon-256x256.png51.98KB31.60KB▼ 39.21%