84% addons-espania

Code Review | Addons Espania

WordPress plugin Addons Espania scored84%from 54 tests.

About plugin

  • Plugin page: addons-espania
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: May 4, 2017
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: Mihail Barinov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /902 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.00MB] [CPU: ▼6.81ms] Passed 4 tests

A check of server-side resources used by Addons Espania
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.33 ▲0.76
Dashboard /wp-admin3.31 ▲0.0143.15 ▼1.05
Posts /wp-admin/edit.php3.36 ▲0.0046.73 ▼4.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.49 ▼20.24
Media Library /wp-admin/upload.php3.23 ▲0.0038.11 ▼1.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 208 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Addons Espania
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.443.72 ▲2.0038.80 ▼7.35
Dashboard /wp-admin2,200 ▲125.81 ▲0.95102.14 ▼6.3241.10 ▼3.02
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0136.92 ▼2.8735.80 ▲0.41
Add New Post /wp-admin/post-new.php1,538 ▲523.14 ▲0.15662.46 ▲37.2849.54 ▼1.68
Media Library /wp-admin/upload.php1,388 ▲64.21 ▲0.0198.74 ▲1.3141.28 ▼2.39

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-espania/widgets/widget-flickr.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/addons-espania/shortcodes/shortcodes.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-espania/widgets/widget-facebook-box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-espania/widgets/widget-social-icons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/addons-espania/meta-box/metaboxes-init.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-espania/widgets/widget-video.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-espania/shortcodes/shortcodes-init.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/addons-espania/addons-espania.php:11

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: widget, plugin, shortcode generator, shortcode, taxonomy...

addons-espania/addons-espania.php 92% from 13 tests

This is the main PHP file of "Addons Espania" version 1.02, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected7,998 lines of code in 188 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1291513553,743
PHP416581,3943,103
CSS1797110944
Markdown1500208

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods153
▷ Static methods12783.01%
▷ Public methods153100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
meta-box/css/select2/select2x2.png0.83KB0.77KB▼ 6.15%
meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
meta-box/img/jqueryui/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%