10% afables

Code Review | Afables

WordPress plugin Afables scored10%from 54 tests.

About plugin

  • Plugin page: afables
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-4.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2014
  • Latest release: Feb 2, 2015
  • Number of updates: 9
  • Update frequency: every 25.0 days
  • Top authors: ohayo-web (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,121 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/afables/inc/afables-widget.php+4
    Function create_function() is deprecated

Server metrics [RAM: ▼1.81MB] [CPU: ▼47.86ms] Passed 4 tests

A check of server-side resources used by Afables
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.295.64 ▼30.30
Dashboard /wp-admin2.20 ▼1.116.02 ▼40.35
Posts /wp-admin/edit.php2.20 ▼1.168.37 ▼34.66
Add New Post /wp-admin/post-new.php2.20 ▼3.696.96 ▼86.12
Media Library /wp-admin/upload.php2.20 ▼1.035.96 ▼29.93

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_afables_widget
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Afables
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8415.21 ▲0.837.51 ▲5.6142.85 ▼0.61
Dashboard /wp-admin2,202 ▲205.95 ▲0.09114.73 ▼7.9542.14 ▼3.28
Posts /wp-admin/edit.php2,094 ▲52.55 ▲0.5448.33 ▲12.9337.01 ▲4.48
Add New Post /wp-admin/post-new.php1,672 ▲13923.06 ▲0.09691.85 ▲28.5539.33 ▼17.39
Media Library /wp-admin/upload.php1,393 ▲25.08 ▲0.88104.46 ▲0.9841.00 ▼4.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/afables/inc/afables-widget.php+4
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_afables_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/afables/js/afables-widget-js.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/afables/inc/afables-install.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/afables/afables.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/afables/inc/afables-widget.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: sidebar, city, widget, afables, feed...

afables/afables.php Passed 13 tests

The main PHP script in "Afables" version 1.3.2 is automatically included on every request by WordPress
32 characters long description:
Widget para wordpress de Afables

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,726 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS35131,609
SVG100504
PHP418272393
PO File2504158
JavaScript131562

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/heart-empty.png1.50KB1.31KB▼ 12.95%
img/heart-full.png0.97KB0.78KB▼ 19.07%