78% yes-co-ores-wordpress-plugin

Code Review | Yes-co ORES

WordPress plugin Yes-co ORES scored78%from 54 tests.

About plugin

  • Plugin page: yes-co-ores-wordp...
  • Plugin version: 1.3.83
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2011
  • Latest release: Dec 28, 2022
  • Number of updates: 358
  • Update frequency: every 12.0 days
  • Top authors: kees-brandenburg (80.73%)svzanden (16.76%)yesco (3.07%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /7,874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼2.00ms] Passed 4 tests

A check of server-side resources used by Yes-co ORES
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5344.79 ▲2.48
Dashboard /wp-admin3.81 ▲0.5055.58 ▲1.86
Posts /wp-admin/edit.php3.89 ▲0.5456.53 ▲0.49
Add New Post /wp-admin/post-new.php6.33 ▲0.4493.58 ▼11.49
Media Library /wp-admin/upload.php3.66 ▲0.4343.72 ▲1.16
Relaties /wp-admin/edit.php?post_type=relatie3.8247.71
Yes-co ORES /wp-admin/options-general.php?page=yesco_OG3.6938.18
Wonen /wp-admin/edit.php?post_type=huis3.8548.26
BOG projecten /wp-admin/edit.php?post_type=yog-bopr3.8544.16
Nieuwbouw /wp-admin/edit.php?post_type=yog-nbpr3.8544.42
BOG /wp-admin/edit.php?post_type=bedrijf3.8540.72
Complex /wp-admin/edit.php?post_type=yog-bbpr3.8542.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 155 new files
Database: no new tables, 19 new options
New WordPress options
widget_yogaddresssearchformwidget
widget_yoglinkedrelationswidget
widget_recent-comments
widget_yogsearchformbbprwidget
widget_yogcontactformwidget
widget_yogsearchformbogwidget
widget_yogrecentobjectswidget
theysaidso_admin_options
widget_yogobjectattachmentswidget
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Yes-co ORES
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲21613.71 ▼0.671.70 ▼0.4045.46 ▲1.88
Dashboard /wp-admin2,319 ▲1134.89 ▲0.0199.73 ▼11.8563.31 ▲19.33
Posts /wp-admin/edit.php2,183 ▲832.06 ▲0.0437.77 ▼3.4141.77 ▲2.58
Add New Post /wp-admin/post-new.php1,745 ▲20022.28 ▼0.84750.86 ▲55.6043.41 ▼14.45
Media Library /wp-admin/upload.php1,474 ▲714.31 ▼0.04109.70 ▲0.8485.23 ▲31.17
Relaties /wp-admin/edit.php?post_type=relatie1,1612.3044.2029.26
Yes-co ORES /wp-admin/options-general.php?page=yesco_OG1,0291.7330.0533.47
Wonen /wp-admin/edit.php?post_type=huis1,2222.2852.6532.63
BOG projecten /wp-admin/edit.php?post_type=yog-bopr1,2002.2339.6337.45
Nieuwbouw /wp-admin/edit.php?post_type=yog-nbpr1,1912.2640.6433.22
BOG /wp-admin/edit.php?post_type=bedrijf1,2222.2735.5332.90
Complex /wp-admin/edit.php?post_type=yog-bbpr1,1932.3634.0430.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 18 options
    • widget_yogsearchformnbtywidget
    • widget_yogsearchformbogwidget
    • widget_yoglinkedobjectswidget
    • widget_yogaddresssearchformwidget
    • db_upgraded
    • widget_yogsearchformbbprwidget
    • widget_yogmapwidget
    • widget_yogsearchformnbprwidget
    • widget_yogsearchformwonenwidget
    • widget_yoglinkedrelationswidget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/yes-co-ores-wordpress-plugin/includes/pages/areas.php
    • > /wp-content/plugins/yes-co-ores-wordpress-plugin/includes/pages/parts/menu.php
    • > /wp-content/plugins/yes-co-ores-wordpress-plugin/scripts/synchronize.php
  • 94× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/widgets/yog_linked_relations_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'YogWpAdminObjectUiAbstract' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/classes/yog_wp_admin_object_ui_nbbn.php:6
    • > PHP Warning
      require_once(YOG_PLUGIN_DIR/includes/config/config.php): failed to open stream: No such file or directory in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/widgets/yog_search_form_widget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/yes-co-ores-wordpress-plugin/yesco-og.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'YogProjectTranslationAbstract' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/classes/yog_project_bog_translation.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/widgets/yog_map_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'YogWpAdminObjectUiAbstract' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/classes/yog_wp_admin_object_ui_bbpr.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/widgets/yog_object_attachments_widget.php:6
    • > PHP Notice
      Undefined variable: templateFiles in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/pages/shortcode_objects.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/yes-co-ores-wordpress-plugin/includes/yog_cli.php:6

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 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: Screenshot #7 (Project details on the Wordpress Admin) image not found
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

yes-co-ores-wordpress-plugin/yesco-og.php 92% from 13 tests

"Yes-co ORES" version 1.3.83's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yes-co-ores-wordpress-plugin.php" instead of "yesco-og.php")

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
There were no executable files found in this plugin20,833 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP743,0695,39915,397
JSON2002,811
JavaScript171911611,271
Sass7171768
PO File2275380580
CSS6036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity27.60
▷ Minimum class complexity1.00
▷ Maximum class complexity273.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes96
▷ Abstract classes1212.50%
▷ Concrete classes8487.50%
▷ Final classes00.00%
Methods633
▷ Static methods243.79%
▷ Public methods53484.36%
▷ Protected methods426.64%
▷ Private methods579.00%
Functions44
▷ Named functions4295.45%
▷ Anonymous functions24.55%
Constants87
▷ Global constants2731.03%
▷ Class constants6068.97%
▷ Public constants60100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon_flickr.png0.65KB0.71KB0.00%
img/slider-arrow-right.png0.27KB0.22KB▼ 17.28%
img/icon_website.png0.88KB1.05KB0.00%
img/maps_marker.png0.80KB0.87KB0.00%
img/slider-arrow-left.png0.25KB0.22KB▼ 13.79%