94% addfunc-adaptive-content

Code Review | AddFunc Adaptive Content

WordPress plugin AddFunc Adaptive Content scored 94% from 54 tests.

About plugin

  • Plugin page: addfunc-adaptive-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0
  • WordPress version: 5.9.2
  • First release: Sep 18, 2015
  • Latest release: Dec 11, 2018
  • Number of updates: 7
  • Update frequency: every 184.6 days
  • Top authors: joerhoney (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,682 total downloads


Plugin footprint Passed 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.15MB] [CPU: ▼295.24ms] Passed 4 tests

A check of server-side resources used by AddFunc Adaptive Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2459.34 ▲1.67
Dashboard /wp-admin3.58 ▲0.1736.25 ▼0.06
Posts /wp-admin/edit.php3.81 ▲0.1742.80 ▲2.38
Add New Post /wp-admin/post-new.php7.05 ▲0.0897.71 ▼1,184.93
Media Library /wp-admin/upload.php3.47 ▲0.1731.77 ▲2.69

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

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

Browser metrics Passed 4 tests

AddFunc Adaptive Content: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,832 ▲11016.24 ▲0.626.01 ▼0.422.47 ▼0.26
Dashboard /wp-admin2,932 ▲716.15 ▼0.00121.06 ▼14.60164.34 ▲4.34
Posts /wp-admin/edit.php2,688 ▼03.08 ▼0.1562.32 ▼1.51141.96 ▲0.96
Add New Post /wp-admin/post-new.php1,755 ▲8121.93 ▲0.37435.69 ▼23.11158.47 ▼4.59
Media Library /wp-admin/upload.php1,701 ▲35.51 ▼0.01142.23 ▼2.99182.89 ▼3.94

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 | A smoke test targeting 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/addfunc-adaptive-content/addfunc-adaptive-content.php:26

User-side errors Passed 1 test

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


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 38 tag instead of maximum 10
You can take inspiration from this readme.txt

addfunc-adaptive-content/addfunc-adaptive-content.php Passed 13 tests

The principal PHP file in "AddFunc Adaptive Content" v. 2.0 is loaded by WordPress automatically on each request
106 characters long description:
Adds functions and shortcodes to empower WordPress users to have better control of when content is served.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin810 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.87
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods925.71%
▷ Public methods3394.29%
▷ Protected methods25.71%
▷ Private methods00.00%
▷ Named functions24100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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