94% addons-espania

Code Review | Addons Espania

WordPress plugin Addons Espania scored 94% 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: 5.9.2
  • 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 / 703 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼304.64ms] Passed 4 tests

An overview of server-side resources used by Addons Espania
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0158.47 ▲1.07
Dashboard /wp-admin3.42 ▲0.0136.89 ▼0.11
Posts /wp-admin/edit.php3.65 ▲0.0140.02 ▲3.26
Add New Post /wp-admin/post-new.php6.89 ▼0.0996.33 ▼1,213.17
Media Library /wp-admin/upload.php3.30 ▲0.0024.74 ▼6.34

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 208 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Addons Espania
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2715.61 ▼0.016.52 ▲0.592.90 ▼0.35
Dashboard /wp-admin2,874 ▲136.05 ▼0.15118.78 ▼17.60154.66 ▼10.87
Posts /wp-admin/edit.php2,694 ▼03.36 ▲0.1263.75 ▼0.80138.79 ▼3.50
Add New Post /wp-admin/post-new.php1,661 ▼9916.11 ▼6.14425.47 ▼15.92155.51 ▲0.57
Media Library /wp-admin/upload.php1,698 ▼05.50 ▼0.03148.43 ▲1.83186.32 ▼1.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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-social-icons.php:2
    • > 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/shortcodes/shortcodes-init.php:10
    • > 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-video.php:2
    • > 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 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: shortcode, sidebar, shortcode generator, plugin, widget...

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

The entry point to "Addons Espania" version 1.02 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • 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 a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin7,998 lines of code in 188 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1291513553,743
PHP416581,3943,103
CSS1797110944
Markdown1500208

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued 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

All PNG images should be compressed to minimize bandwidth usage for end users
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_75_dadada_1x400.png0.11KB0.16KB0.00%
meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%