83% pelagios-widgets-for-wordpress

Code Review | Pelagios Widgets for WordPress

WordPress plugin Pelagios Widgets for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: pelagios-widgets-...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 6.3.1
  • First release: Aug 9, 2012
  • Latest release: Aug 20, 2015
  • Number of updates: 11
  • Update frequency: every 100.7 days
  • Top authors: donutz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,087 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: ▲0.03MB] [CPU: ▼3.77ms] Passed 4 tests

Analyzing server-side resources used by Pelagios Widgets for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.61 ▼6.40
Dashboard /wp-admin3.33 ▲0.0343.16 ▼5.18
Posts /wp-admin/edit.php3.44 ▲0.0945.18 ▼1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.27 ▼2.13
Media Library /wp-admin/upload.php3.25 ▲0.0337.36 ▲3.51
Pelagios Widgets /wp-admin/options-general.php?page=wp-pelagios-settings3.2932.84

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 181 new files
Database: no new tables, 15 new options
New WordPress options
wp_pelagios_db_version
wp_pelagios_js_source
db_upgraded
theysaidso_admin_options
wp_pelagios_quicktags
wp_pelagios_button
widget_theysaidso_widget
wp_pelagios_search_widget_maps
wp_pelagios_place_on_mouseover
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pelagios Widgets for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲6113.15 ▼1.081.82 ▼0.1137.87 ▼8.88
Dashboard /wp-admin2,213 ▲254.84 ▼1.04112.70 ▲9.6939.66 ▼2.00
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0239.82 ▲6.2934.44 ▼3.59
Add New Post /wp-admin/post-new.php1,525 ▼1723.17 ▲5.15657.56 ▲8.4662.62 ▲11.46
Media Library /wp-admin/upload.php1,395 ▲74.22 ▲0.0592.85 ▼10.9545.03 ▲0.33
Pelagios Widgets /wp-admin/options-general.php?page=wp-pelagios-settings1,0262.0724.2930.90

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pelagios-widgets-for-wordpress/inc/widgets/widget-pelagios-search.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pelagios-widgets-for-wordpress/inc/admin/admin-init.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pelagios-widgets-for-wordpress/inc/wp/functions.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pelagios-widgets-for-wordpress/inc/widgets/widget-pelagios-search.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pelagios-widgets-for-wordpress/inc/admin/admin-settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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:
  • Screenshots: These screenshots require images: #1 (icon), #2 (popup)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

pelagios-widgets-for-wordpress/wp-pelagios.php 77% from 13 tests

"Pelagios Widgets for WordPress" version 0.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 350 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pelagios-widgets-for-wordpress.php" instead of "wp-pelagios.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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 detected2,474 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
HTML4011601,081
PHP10151424986
JSON170132
Handlebars12100123
CSS543990
JavaScript28229862

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity18.00
▷ Minimum class complexity3.00
▷ Maximum class complexity33.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
49 PNG files occupy 0.42MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/assets/js/build/images/partner_icons/gap_logo.png1.28KB1.20KB▼ 6.17%
inc/assets/js/build/images/place_type_icons/island2.png1.20KB0.58KB▼ 51.42%
inc/assets/js/build/images/place_type_icons/settlement.png1.34KB0.76KB▼ 43.53%
inc/assets/js/build/images/partner_icons/nomisma.png1.06KB0.79KB▼ 24.84%
inc/assets/js/build/images/icons/pelagios.png1.23KB1.02KB▼ 17.00%