83% aa-dynamic-content-restriction-pro

Code Review | AA Dynamic Content Restriction Pro

WordPress plugin AA Dynamic Content Restriction Proscored 83% from 54 tests.

About plugin

  • Plugin page: aa-dynamic-conten...
  • Plugin version: aapaypal
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 5.9.2
  • First release: Nov 7, 2014
  • Latest release: Nov 7, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: aaextention (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 639 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼273.05ms] Passed 4 tests

A check of server-side resources used by AA Dynamic Content Restriction Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1992.65 ▲23.64
Dashboard /wp-admin3.42 ▲0.0264.66 ▲21.95
Posts /wp-admin/edit.php3.66 ▲0.0179.17 ▲28.50
Add New Post /wp-admin/post-new.php6.89 ▼0.07133.73 ▼1,166.30
Media Library /wp-admin/upload.php3.31 ▲0.0265.78 ▲28.59

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, no new options
New tables
content_res

Browser metrics Passed 4 tests

AA Dynamic Content Restriction Pro: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,793 ▲3915.95 ▲0.2315.85 ▲2.492.88 ▼0.81
Dashboard /wp-admin2,914 ▲356.39 ▲0.03190.91 ▼21.96212.67 ▲6.67
Posts /wp-admin/edit.php2,685 ▼03.43 ▲0.0187.00 ▼0.39174.44 ▼2.97
Add New Post /wp-admin/post-new.php1,635 ▼2616.07 ▼0.72654.65 ▲20.94212.50 ▼2.66
Media Library /wp-admin/upload.php1,697 ▲25.75 ▲0.12217.99 ▲30.87262.45 ▼1.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • content_res

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/aa-dynamic-content-restriction-pro/aacontentres.php on line 31
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/aa-dynamic-content-restriction-pro/aacontentres.php on line 31
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aa-dynamic-content-restriction-pro/aacontentres.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === AA Dynamic Content Restriction Pro=== )
The official readme.txt might help

aa-dynamic-content-restriction-pro/aacontentres.php 85% from 13 tests

The entry point to "AA Dynamic Content Restriction Pro" version aapaypal is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aa-dynamic-content-restriction-pro.php" instead of "aacontentres.php")
  • Version: Plugin version not found

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1431942

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin