84% acc-conditional-typo

Code Review | ACC | Advanced Custom Code

WordPress plugin ACC | Advanced Custom Code scored 84% from 54 tests.

About plugin

  • Plugin page: acc-conditional-typo
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jun 28, 2020
  • Latest release: Nov 6, 2021
  • Number of updates: 17
  • Update frequency: every 30.4 days
  • Top authors: grandplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 574 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.18MB] [CPU: ▼280.40ms] Passed 4 tests

Analyzing server-side resources used by ACC | Advanced Custom Code
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.9078.54 ▲13.78
Dashboard /wp-admin6.11 ▲2.7151.05 ▲15.28
Posts /wp-admin/edit.php6.25 ▲2.6160.00 ▲20.69
Add New Post /wp-admin/post-new.php9.46 ▲2.49114.70 ▼1,171.36
Media Library /wp-admin/upload.php6.10 ▲2.8057.93 ▲33.53
Global /wp-admin/edit.php?post_type=gpac_code&page=wpgpsc_global6.1043.53
Add New /wp-admin/post-new.php?post_type=gpac_code6.3956.01
Manage Code /wp-admin/edit.php?post_type=gpac_code6.1748.16
Help /wp-admin/edit.php?post_type=gpac_code&page=grandplugin_help6.1045.72

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 120 new files
Database: no new tables, 1 new option
New WordPress options
_wpgp_option_global

Browser metrics Passed 4 tests

An overview of browser requirements for ACC | Advanced Custom Code
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,268 ▲52620.04 ▲4.659.13 ▲3.342.05 ▼0.33
Dashboard /wp-admin3,262 ▲4059.25 ▲3.09172.41 ▲40.34153.88 ▼12.50
Posts /wp-admin/edit.php3,324 ▲6337.16 ▲3.9296.04 ▲30.93151.46 ▲2.69
Add New Post /wp-admin/post-new.php1,945 ▲28417.91 ▲2.39433.44 ▼11.54187.79 ▼9.54
Media Library /wp-admin/upload.php2,118 ▲4297.89 ▲2.37131.11 ▼20.16197.68 ▼40.79
Global /wp-admin/edit.php?post_type=gpac_code&page=wpgpsc_global5,1147.45134.84124.74
Add New /wp-admin/post-new.php?post_type=gpac_code3,32910.53194.17377.67
Manage Code /wp-admin/edit.php?post_type=gpac_code2,0027.1792.60117.06
Help /wp-admin/edit.php?post_type=gpac_code&page=grandplugin_help1,8616.8888.67214.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • _wpgp_option_global

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 31
    • > PHP Notice
      Undefined variable: acc_value in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 113
    • > PHP Warning
      array_filter() expects parameter 1 to be array, null given in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 40
    • > PHP Warning
      array_column() expects parameter 1 to be array, null given in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/acc-conditional-typo/admin/partials/acc-conditional-typo-admin-display.php:18
    • > PHP Notice
      Undefined variable: acc_value in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 113
    • > PHP Notice
      Undefined variable: acc_value in wp-content/plugins/acc-conditional-typo/public/partials/acc-conditional-typo-public-display.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

acc-conditional-typo/acc-conditional-typo.php Passed 13 tests

This is the main PHP file of "ACC | Advanced Custom Code" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
118 characters long description:
Add custom code like HTML, CSS, JavaScript, PHP with a versatile code editor implemented in individual posts or pages.

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
No dangerous file extensions were detected15,551 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP862,4371,7207,322
CSS63464834,253
JavaScript71,1943973,831
PO File16371143
SVG2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity21.11
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity6.07
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes00.00%
Methods259
▷ Static methods3714.29%
▷ Public methods25297.30%
▷ Protected methods10.39%
▷ Private methods62.32%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon-128x128.png4.05KB1.88KB▼ 53.54%
admin/wpgp-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
admin/img/youtube-video-id.png20.48KB19.97KB▼ 2.49%
admin/img/advanced-custom-code-logo.png22.18KB3.71KB▼ 83.26%
admin/img/get-api-key.png44.92KB22.32KB▼ 50.30%