10% scuolasemplice-contacts

Code Review | ScuolaSemplice Contacts

WordPress plugin ScuolaSemplice Contacts scored10%from 54 tests.

About plugin

  • Plugin page: scuolasemplice-co...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: Jul 22, 2020
  • Number of updates: 45
  • Update frequency: every 5.1 days
  • Top authors: blucloudsrl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /702 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/scuolasemplice-contacts/ScuolasemplceContacts_Plugin.php+35
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.40MB] [CPU: ▼0.35ms] Passed 4 tests

Analyzing server-side resources used by ScuolaSemplice Contacts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3841.23 ▼1.04
Dashboard /wp-admin3.75 ▲0.4550.43 ▼0.06
Posts /wp-admin/edit.php3.80 ▲0.4451.41 ▲3.00
Add New Post /wp-admin/post-new.php6.27 ▲0.3896.21 ▼3.30
Media Library /wp-admin/upload.php3.61 ▲0.3838.28 ▲4.72
Forms /wp-admin/admin.php?page=scuolasemplcecontacts_admin3.4928.00
Api Fields /wp-admin/admin.php?page=scuolasemplcecontacts_apiFieldsPage3.5830.45
Forms /wp-admin/admin.php?page=scuolasemplcecontacts_buildform3.4927.55
Settings /wp-admin/admin.php?page=scuolasemplcecontacts_Settings3.5835.33
Enquiry /wp-admin/admin.php?page=scuolasemplcecontacts_Enquiry3.4928.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 104 new files
Database: 3 new tables, 11 new options
New tables
wp_scuolasemplcecontacts_plugin_apiformfields
wp_scuolasemplcecontacts_plugin_enquiry
wp_scuolasemplcecontacts_plugin_apiforms
New WordPress options
widget_theysaidso_widget
widget_recent-posts
ScuolasemplceContacts_Plugin_ApiPassword
ScuolasemplceContacts_Plugin_Apihost
ScuolasemplceContacts_Plugin__version
db_upgraded
ScuolasemplceContacts_Plugin__installed
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for ScuolaSemplice Contacts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲8213.22 ▼1.071.68 ▼0.3441.30 ▼9.27
Dashboard /wp-admin2,245 ▲575.85 ▲0.9696.20 ▼20.8738.05 ▼7.30
Posts /wp-admin/edit.php2,128 ▲362.03 ▲0.0241.17 ▼0.3635.41 ▲1.97
Add New Post /wp-admin/post-new.php1,546 ▲1317.79 ▼5.56672.65 ▲2.4853.98 ▲0.20
Media Library /wp-admin/upload.php1,421 ▲334.24 ▲0.0196.90 ▼2.0841.50 ▲0.86
Forms /wp-admin/admin.php?page=scuolasemplcecontacts_admin1,0852.7353.2273.23
Api Fields /wp-admin/admin.php?page=scuolasemplcecontacts_apiFieldsPage8431.9324.2924.01
Forms /wp-admin/admin.php?page=scuolasemplcecontacts_buildform1,0902.2131.3327.00
Settings /wp-admin/admin.php?page=scuolasemplcecontacts_Settings8611.6825.1825.58
Enquiry /wp-admin/admin.php?page=scuolasemplcecontacts_Enquiry1,0942.6048.8230.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • ScuolasemplceContacts_Plugin__version
    • can_compress_scripts
    • ScuolasemplceContacts_Plugin__installed
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=scuolasemplcecontacts_Enquiry
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=scuolasemplcecontacts_buildform
    • > Notice in wp-content/plugins/scuolasemplice-contacts/ScuolasemplceContacts_OptionsManager.php+692
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=scuolasemplcecontacts_buildform
    • > Notice in wp-content/plugins/scuolasemplice-contacts/ScuolasemplceContacts_OptionsManager.php+846
    Trying to get property 'standardfields' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=scuolasemplcecontacts_buildform
    • > Warning in wp-content/plugins/scuolasemplice-contacts/ScuolasemplceContacts_OptionsManager.php+869
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=scuolasemplcecontacts_buildform
    • > Notice in wp-content/plugins/scuolasemplice-contacts/ScuolasemplceContacts_OptionsManager.php+869
    Trying to get property 'customfields' of non-object

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Configuration form where you put URL, Username and password for the ScuolaSemplice APIs), #2 (List of standard and custom fields fetched from tge remote system), #3 (Visual form builder)
You can look at the official readme.txt

scuolasemplice-contacts/scuolasemplceContacts.php 85% from 13 tests

The primary PHP file in "ScuolaSemplice Contacts" version 1.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("scuolasemplice-contacts.php" instead of "scuolasemplceContacts.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected28,491 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript194,17214,21414,270
CSS19911855,531
SVG2002,959
Sass1536361,796
LESS1536461,786
PHP63884211,725
PO File2185206424

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity52.75
▷ Minimum class complexity2.00
▷ Maximum class complexity143.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods96
▷ Static methods00.00%
▷ Public methods6466.67%
▷ Protected methods3233.33%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
12 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/dt/DataTables-1.10.20/images/sort_both.png0.20KB0.29KB0.00%
inc/dt/DataTables-1.10.20/images/sort_asc.png0.16KB0.25KB0.00%
css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
css/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%