89% awp-placeholder-variable

Code Review | Affiliate WP - Placeholder Variable

WordPress plugin Affiliate WP - Placeholder Variable scored 89% from 54 tests.

About plugin

  • Plugin page: awp-placeholder-v...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2019
  • Latest release: Aug 20, 2019
  • Number of updates: 3
  • Update frequency: every 38.0 days
  • Top authors: qfnetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Affiliate WP - Placeholder Variable
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.83 ▲0.32
Dashboard /wp-admin3.31 ▲0.0144.95 ▼2.28
Posts /wp-admin/edit.php3.36 ▲0.0146.42 ▲0.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.37 ▼4.02
Media Library /wp-admin/upload.php3.23 ▲0.0035.27 ▲2.64

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Affiliate WP - Placeholder Variable
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.381.66 ▼0.1044.12 ▲1.38
Dashboard /wp-admin2,206 ▲155.80 ▲0.8894.93 ▼6.3940.95 ▼3.66
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0140.96 ▲1.5836.37 ▲0.38
Add New Post /wp-admin/post-new.php1,544 ▲2518.23 ▼4.62642.08 ▼37.7666.90 ▲5.09
Media Library /wp-admin/upload.php1,391 ▼04.27 ▲0.03100.26 ▲1.3644.22 ▲0.61

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires php: Version format is invalid
You can look at the official readme.txt

awp-placeholder-variable/affiliatewp-placeholder-variable.php 85% from 13 tests

"Affiliate WP - Placeholder Variable" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • 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
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awp-placeholder-variable.php" instead of "affiliatewp-placeholder-variable.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin39 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14830
JavaScript1309

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
PNG images were not found in this plugin