79% enrico

Code Review | Enrico

WordPress plugin Enrico scored79%from 54 tests.

About plugin

  • Plugin page: enrico
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Feb 9, 2017
  • Number of updates: 26
  • Update frequency: every 9.7 days
  • Top authors: gbellak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Enrico
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.38 ▲0.55
Dashboard /wp-admin3.36 ▲0.0639.76 ▼6.50
Posts /wp-admin/edit.php3.41 ▲0.0645.16 ▼6.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0675.88 ▼9.81
Media Library /wp-admin/upload.php3.28 ▲0.0633.55 ▲1.37
Partner Categories /wp-admin/edit-tags.php?taxonomy=partner_type&post_type=enrico3.2829.54
Add New Company /wp-admin/post-new.php?post_type=enrico3.4152.23
Enrico Import /wp-admin/edit.php?post_type=enrico&page=enrico_company_import3.2531.03
Enrico /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php3.2234.22
Directory Refresh /wp-admin/edit.php?post_type=enrico&page=enrico_dir_refresh3.2530.49
Enrico Directory /wp-admin/edit.php?post_type=enrico3.3334.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
enrico_map_preferredMap
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
enrico_archive_posts_sort_order
can_compress_scripts
db_upgraded
enrico_archive_posts_sort_term

Browser metrics Passed 4 tests

A check of browser resources used by Enrico
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲7913.29 ▼1.091.61 ▼0.2737.56 ▼1.89
Dashboard /wp-admin2,246 ▲555.90 ▲0.04110.28 ▲11.3142.81 ▼0.81
Posts /wp-admin/edit.php2,132 ▲402.00 ▼0.0139.91 ▼3.3934.80 ▼3.29
Add New Post /wp-admin/post-new.php1,549 ▲3517.46 ▼0.10664.12 ▲76.4852.27 ▼7.63
Media Library /wp-admin/upload.php1,428 ▲374.24 ▼0.0194.43 ▲0.9441.58 ▼1.57
Partner Categories /wp-admin/edit-tags.php?taxonomy=partner_type&post_type=enrico1,3022.1429.6429.70
Add New Company /wp-admin/post-new.php?post_type=enrico2,4663.8978.3762.87
Enrico Import /wp-admin/edit.php?post_type=enrico&page=enrico_company_import9152.0322.8427.29
Enrico /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php1,0192.0423.2328.62
Directory Refresh /wp-admin/edit.php?post_type=enrico&page=enrico_dir_refresh8042.0625.1325.64
Enrico Directory /wp-admin/edit.php?post_type=enrico1,2031.9630.6029.82

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: 9 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • enrico_archive_posts_sort_order
    • widget_recent-comments
    • enrico_map_preferredMap
    • enrico_archive_posts_sort_term
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Warning in wp-content/plugins/enrico/adminpages/enrico_settings.php+141
    Use of undefined constant homepage - assumed 'homepage' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Notice in wp-content/plugins/enrico/adminpages/enrico_settings.php+156
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Warning in wp-content/plugins/enrico/adminpages/enrico_settings.php+144
    Use of undefined constant altURL - assumed 'altURL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Warning in wp-content/plugins/enrico/adminpages/enrico_settings.php+147
    Use of undefined constant facebook - assumed 'facebook' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Warning in wp-content/plugins/enrico/adminpages/enrico_settings.php+150
    Use of undefined constant email - assumed 'email' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Warning in wp-content/plugins/enrico/adminpages/enrico_settings.php+153
    Use of undefined constant infoPageLink - assumed 'infoPageLink' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=enrico/adminpages/enrico_settings.php
    • > Warning in wp-content/plugins/enrico/adminpages/enrico_settings.php+156
    Use of undefined constant directions - assumed 'directions' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/enrico/enrico.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/enrico/templates/archive-enrico.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/enrico/templates/single-enrico.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/enrico/templates/taxonomy-partner_type.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: enirose, eniro map, google map, company directory, gulesiderno...

enrico/enrico.php Passed 13 tests

The main PHP file in "Enrico" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Eniro API support for registering Company Posts

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
Good job! No executable or dangerous file extensions detected1,283 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP14732701,144
CSS136385
JavaScript123454

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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