77% 4nton-accordion

Code Review | Anton Accordion

WordPress plugin Anton Accordion scored77%from 54 tests.

About plugin

  • Plugin page: 4nton-accordion
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 6.3.1
  • First release: Sep 18, 2017
  • Latest release: Jun 1, 2019
  • Number of updates: 13
  • Update frequency: every 47.9 days
  • Top authors: master buldog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.80ms] Passed 4 tests

Analyzing server-side resources used by Anton Accordion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1245.43 ▲2.35
Dashboard /wp-admin63.29 ▲0.0112,382,982.84 ▲8,764.38
Posts /wp-admin/edit.php3.58 ▲0.1851.23 ▼2.88
Add New Post /wp-admin/post-new.php6.05 ▲0.1191.06 ▼11.09
Media Library /wp-admin/upload.php3.39 ▲0.1142.11 ▲4.40
Add Accordion /wp-admin/post-new.php?post_type=anton_accordion3.5157.81
Accordions /wp-admin/edit.php?post_type=anton_accordion3.4341.54
Category /wp-admin/edit-tags.php?taxonomy=anton_accordions&post_type=anton_accordion3.3837.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Anton Accordion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.17 ▼0.221.65 ▼0.1040.93 ▼4.23
Dashboard /wp-admin2,231 ▲545.64 ▼0.0285.51 ▼3.9337.80 ▼2.13
Posts /wp-admin/edit.php2,133 ▲331.99 ▲0.0238.55 ▲1.8434.93 ▼0.17
Add New Post /wp-admin/post-new.php1,554 ▲2623.59 ▲0.71702.25 ▲56.7266.38 ▲2.02
Media Library /wp-admin/upload.php1,436 ▲424.19 ▼0.03108.10 ▲5.8747.60 ▲3.57
Add Accordion /wp-admin/post-new.php?post_type=anton_accordion2,2857.61174.1264.04
Accordions /wp-admin/edit.php?post_type=anton_accordion1,1051.9032.1531.35
Category /wp-admin/edit-tags.php?taxonomy=anton_accordions&post_type=anton_accordion1,3042.1227.5130.91

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 37 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=anton_accordions&post_type=anton_accordion
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 37 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=anton_accordions&post_type=anton_accordion
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× 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/4nton-accordion/lib/admin/post-type.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Anton Accordion page options.) image not found
You can take inspiration from this readme.txt

4nton-accordion/anton-accordion.php 77% from 13 tests

The entry point to "Anton Accordion" version 1.0.8 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages/")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("4nton-accordion.php" instead of "anton-accordion.php")

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 detected1,290 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
SVG100655
PHP43233544
CSS20160
JavaScript20131

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity10.00
▷ Minimum class complexity9.00
▷ Maximum class complexity11.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods00.00%
▷ Private methods320.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
PNG images were not found in this plugin