93% 4nton-accordion

Code Review | Anton Accordion

WordPress plugin Anton Accordion scored 93% 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: 5.9.2
  • 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 / 678 total downloads


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
Installer ran successfully

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

A check of server-side resources used by Anton Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1854.29 ▲3.04
Dashboard /wp-admin3.53 ▲0.1234.29 ▲0.33
Posts /wp-admin/edit.php3.76 ▲0.1239.49 ▲2.01
Add New Post /wp-admin/post-new.php6.99 ▲0.0293.12 ▼1,178.24
Media Library /wp-admin/upload.php3.41 ▲0.1126.18 ▲0.63
Add Accordion /wp-admin/post-new.php?post_type=anton_accordion3.7445.89
Accordions /wp-admin/edit.php?post_type=anton_accordion3.5027.84
Category /wp-admin/edit-tags.php?taxonomy=anton_accordions&post_type=anton_accordion3.4025.63

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Anton Accordion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,841 ▲8716.02 ▲0.477.68 ▲1.662.88 ▲0.37
Dashboard /wp-admin2,936 ▲756.00 ▼0.17117.57 ▼20.83152.93 ▼7.34
Posts /wp-admin/edit.php2,735 ▲443.24 ▲0.0164.40 ▲3.47140.74 ▼0.12
Add New Post /wp-admin/post-new.php1,786 ▲10721.35 ▼1.15463.83 ▲40.32157.96 ▼3.09
Media Library /wp-admin/upload.php1,740 ▲425.48 ▼0.04140.47 ▼8.37189.95 ▲1.89
Add Accordion /wp-admin/post-new.php?post_type=anton_accordion2,96210.07196.51206.06
Accordions /wp-admin/edit.php?post_type=anton_accordion1,4183.1661.15111.81
Category /wp-admin/edit-tags.php?taxonomy=anton_accordions&post_type=anton_accordion1,6632.7757.28114.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller 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)
Even though everything seems fine, this is not an exhaustive test

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 a shallow check for browser errors
No browser issues were found


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Anton Accordion page options.) image required
The official readme.txt might help

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

The main PHP file in "Anton Accordion" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("4nton-accordion.php" instead of "anton-accordion.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/i18n/languages/")

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 plugin1,290 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods00.00%
▷ Private methods320.00%
▷ Named functions21100.00%
▷ Anonymous functions00.00%
▷ Global constants17100.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
No PNG files were detected