83% zypento

Code Review | Zypento

WordPress plugin Zypento scored83%from 54 tests.

About plugin

  • Plugin page: zypento
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: May 12, 2023
  • Latest release: May 13, 2023
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: sproutient (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /112 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.51ms] Passed 4 tests

An overview of server-side resources used by Zypento
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.31 ▲0.28
Dashboard /wp-admin3.37 ▲0.0751.69 ▼2.80
Posts /wp-admin/edit.php3.41 ▲0.0647.32 ▼8.53
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.30 ▼10.99
Media Library /wp-admin/upload.php3.29 ▲0.0637.38 ▲3.03

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zypento
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.59 ▼1.0311.60 ▲9.9240.02 ▼2.75
Dashboard /wp-admin2,215 ▲305.86 ▲0.05102.01 ▲0.3040.72 ▼1.03
Posts /wp-admin/edit.php2,104 ▲122.17 ▲0.1240.45 ▼3.0035.45 ▼0.61
Add New Post /wp-admin/post-new.php1,537 ▼223.26 ▲4.96685.96 ▲46.9666.48 ▲15.84
Media Library /wp-admin/upload.php1,397 ▲64.20 ▼0.0098.48 ▼5.1247.69 ▲1.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% 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)
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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/zypento/partials/admin-page.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function managing_stock() on null in wp-content/plugins/zypento/partials/notifications/back-in-stock-form.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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:
  • Donate link: Invalid url: "zypento.com"
Please take inspiration from this readme.txt

zypento/plugin.php 85% from 13 tests

This is the main PHP file of "Zypento" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("zypento.php" instead of "plugin.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 plugin3,321 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP217851,0482,216
JavaScript1127290646
Sass7120452
JSON1005
CSS3102

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.46
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods108
▷ Static methods2422.22%
▷ Public methods10294.44%
▷ Protected methods00.00%
▷ Private methods65.56%
Functions11
▷ Named functions19.09%
▷ Anonymous functions1090.91%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin