78% eyezon

Code Review | eyezon

WordPress plugin eyezon scored78%from 54 tests.

About plugin

  • Plugin page: eyezon
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2022
  • Latest release: Nov 12, 2022
  • Number of updates: 9
  • Update frequency: every 11.1 days
  • Top authors: eyezon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /213 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 gracefully, with no errors

Server metrics [RAM: ▲1.06MB] [CPU: ▲5.23ms] Passed 4 tests

This is a short check of server-side resources used by eyezon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0645.77 ▲3.78
Dashboard /wp-admin4.38 ▲1.0353.35 ▼5.00
Posts /wp-admin/edit.php4.43 ▲1.0761.10 ▲13.38
Add New Post /wp-admin/post-new.php6.98 ▲1.0995.24 ▲12.29
Media Library /wp-admin/upload.php4.30 ▲1.0644.08 ▲9.85

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 63 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
eyezon-version
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by eyezon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲12013.36 ▼1.392.58 ▲0.8842.00 ▼5.69
Dashboard /wp-admin2,211 ▲205.97 ▲1.05111.30 ▲0.5982.86 ▲38.45
Posts /wp-admin/edit.php2,112 ▲202.05 ▲0.0639.77 ▼2.3634.37 ▼4.02
Add New Post /wp-admin/post-new.php1,550 ▲3123.19 ▲0.39774.41 ▲155.1759.64 ▲15.06
Media Library /wp-admin/upload.php1,405 ▲234.26 ▲0.08104.53 ▲4.5469.71 ▲27.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • eyezon-version
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/eyezon/eyezon.php
    • > /wp-content/plugins/eyezon/vendor/micropackage/requirements/tests/bootstrap.php
  • 266× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'eyezon\\Engine\\Base' not found in wp-content/plugins/eyezon/integrations/CMB.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/eyezon/vendor/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eyezon/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eyezon/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Localheinz\\Diff\\Output\\AbstractChunkOutputBuilder' not found in wp-content/plugins/eyezon/vendor/localheinz/diff/src/Output/UnifiedDiffOutputBuilder.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Ergebnis\\Json\ormalizer\ormalizerInterface' not found in wp-content/plugins/eyezon/vendor/ergebnis/json-normalizer/src/CallableNormalizer.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/eyezon/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSchemaException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eyezon/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eyezon/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Ergebnis\\Json\ormalizer\ormalizerInterface' not found in wp-content/plugins/eyezon/vendor/ergebnis/json-normalizer/src/SchemaNormalizer.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

eyezon/eyezon.php 85% from 13 tests

"eyezon" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 554 characters long)
  • Git Repository: There should be no Git repositories present in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin113,045 lines of code in 614 files:
LanguageFilesBlank linesComment linesLines of code
JSON2431039,317
PO File12314,47518,79232,607
PHP3756,06113,28323,222
CSS172751,2195,608
SVG50124,666
Markdown221,21902,993
JavaScript144977052,398
Sass22380291,750
YAML54336214
XML6218150
Bourne Shell12111120

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.24
▷ Minimum class complexity1.00
▷ Maximum class complexity196.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces47
Interfaces22
Traits2
Classes331
▷ Abstract classes185.44%
▷ Concrete classes31394.56%
▷ Final classes5216.61%
Methods1,454
▷ Static methods21014.44%
▷ Public methods1,17480.74%
▷ Protected methods19413.34%
▷ Private methods865.91%
Functions99
▷ Named functions5656.57%
▷ Anonymous functions4343.43%
Constants91
▷ Global constants1213.19%
▷ Class constants7986.81%
▷ Public constants7088.61%

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
16 PNG files occupy 0.26MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
assets/images/eye.png1.05KB0.69KB▼ 33.98%
vendor/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%