72% erudus-one

Code Review | Erudus One for WordPress

WordPress plugin Erudus One for WordPress scored72%from 54 tests.

About plugin

  • Plugin page: erudus-one
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 1, 2018
  • Latest release: Jun 5, 2018
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: livingos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼12.29ms] Passed 4 tests

Analyzing server-side resources used by Erudus One for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.94 ▲4.29
Dashboard /wp-admin3.22 ▼0.0933.85 ▼13.28
Posts /wp-admin/edit.php3.28 ▼0.0737.09 ▼8.41
Add New Post /wp-admin/post-new.php5.46 ▼0.4367.89 ▼23.83
Media Library /wp-admin/upload.php3.22 ▼0.0128.95 ▼3.65
Erudus One /wp-admin/options-general.php?page=erudus-one-admin3.1928.57

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_erudus_cache
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Erudus One for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.27 ▲0.021.80 ▲0.2343.16 ▲2.67
Dashboard /wp-admin2,213 ▲355.58 ▼0.0982.53 ▼16.8838.68 ▼5.83
Posts /wp-admin/edit.php2,118 ▲182.01 ▲0.0338.75 ▼3.5736.71 ▼15.81
Add New Post /wp-admin/post-new.php1,540 ▲1223.40 ▲0.32662.48 ▼3.0559.94 ▲6.15
Media Library /wp-admin/upload.php1,418 ▲154.23 ▲0.0696.13 ▼2.0143.03 ▼9.76
Erudus One /wp-admin/options-general.php?page=erudus-one-admin8191.6524.9928.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=erudus-one-admin
    • > Notice in wp-content/plugins/erudus-one/admin/class-erudus-admin.php+189
    Trying to access array offset on value of type bool

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/erudus-one/templates/product.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/erudus-one/templates/product.php on line 8
    • > PHP Notice
      Trying to get property 'components' of non-object in wp-content/plugins/erudus-one/templates/product.php on line 14
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/erudus-one/templates/product.php on line 10
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/erudus-one/templates/product.php on line 12
    • > PHP Notice
      Trying to get property 'product_description' of non-object in wp-content/plugins/erudus-one/templates/product.php on line 12
    • > PHP Notice
      Trying to get property 'case_label_name' of non-object in wp-content/plugins/erudus-one/templates/product.php on line 8
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/erudus-one/templates/product.php on line 14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/erudus-one/templates/product.php on line 14
    • > PHP Notice
      Trying to get property 'traded_unit_gtin' of non-object in wp-content/plugins/erudus-one/templates/product.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: allergens, nutrition, ingredients, food, api

erudus-one/erudus-wp.php 77% from 13 tests

"Erudus One for WordPress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("erudus-one.php" instead of "erudus-wp.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected585 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11198300585

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2686.67%
▷ Protected methods310.00%
▷ Private methods13.33%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin