83% acf-flexible-content-toggler

Code Review | Advanced Custom Fields: Flexible Content Toggler

WordPress plugin Advanced Custom Fields: Flexible Content Toggler scored83%from 54 tests.

About plugin

  • Plugin page: acf-flexible-cont...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Feb 2, 2014
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: bluoma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,395 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.00MB] [CPU: ▼5.79ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Custom Fields: Flexible Content Toggler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.49 ▼4.53
Dashboard /wp-admin3.31 ▲0.0060.28 ▲12.01
Posts /wp-admin/edit.php3.36 ▲0.0048.62 ▼7.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.04 ▼10.50
Media Library /wp-admin/upload.php3.23 ▲0.0038.93 ▼1.02

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Flexible Content Toggler
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.042.02 ▲0.2444.65 ▲2.50
Dashboard /wp-admin2,198 ▲185.62 ▼0.0583.31 ▼6.2442.64 ▼0.57
Posts /wp-admin/edit.php2,100 ▼02.08 ▲0.1036.19 ▼2.5433.55 ▼2.81
Add New Post /wp-admin/post-new.php1,529 ▲323.16 ▲0.24664.64 ▲4.1854.68 ▼4.87
Media Library /wp-admin/upload.php1,394 ▼64.19 ▲0.06101.76 ▼13.7044.95 ▼3.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-content-toggler/acf_flexible_content_toggler.php:23

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
You can look at the official readme.txt

acf-flexible-content-toggler/acf_flexible_content_toggler.php 85% from 13 tests

Analyzing the main PHP file in "Advanced Custom Fields: Flexible Content Toggler" version 1.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-flexible-content-toggler.php" instead of "acf_flexible_content_toggler.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 384 characters long)

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
No dangerous file extensions were detected37 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS13015
PHP123913
JavaScript1307
XML2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected