84% ads-on-content-amp-pages

Code Review | Ads on Content AMP Pages

WordPress plugin Ads on Content AMP Pages scored84%from 54 tests.

About plugin

  • Plugin page: ads-on-content-am...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 31, 2017
  • Latest release: Jan 3, 2018
  • Number of updates: 20
  • Update frequency: every 0.2 days
  • Top authors: alaaabdelsamie (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,819 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by Ads on Content AMP Pages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.45 ▼4.51
Dashboard /wp-admin3.32 ▲0.0145.66 ▼8.41
Posts /wp-admin/edit.php3.37 ▲0.0143.86 ▼3.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.03 ▼3.89
Media Library /wp-admin/upload.php3.24 ▲0.0133.15 ▼0.60
Ads Content AMP /wp-admin/options-general.php?page=aacap_ads_content_amp3.2030.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads on Content AMP Pages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.48 ▼0.101.72 ▼0.1239.96 ▼8.11
Dashboard /wp-admin2,210 ▲255.90 ▲1.02100.41 ▼15.7935.77 ▼11.06
Posts /wp-admin/edit.php2,075 ▼142.03 ▼0.0235.57 ▼2.4534.28 ▼5.13
Add New Post /wp-admin/post-new.php1,532 ▼118.63 ▼4.56664.86 ▼16.6969.57 ▲12.97
Media Library /wp-admin/upload.php1,392 ▲14.29 ▲0.0292.61 ▼3.5440.32 ▼4.71
Ads Content AMP /wp-admin/options-general.php?page=aacap_ads_content_amp8422.0223.1033.94

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 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 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/ads-on-content-amp-pages/ads-on-content-amp-pages.php:46

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Settings), #2 (Ads on Content AMP Settings)
The official readme.txt might help

ads-on-content-amp-pages/ads-on-content-amp-pages.php Passed 13 tests

The principal PHP file in "Ads on Content AMP Pages" v. 1.0 is loaded by WordPress automatically on each request
84 characters long description:
Insert Ads WithIn your Post Content AMP Pages in WordPress, To Make Money from AMP .

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
There were no executable files found in this plugin101 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12612101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions8
▷ Named functions8100.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-256x256.png18.98KB8.17KB▼ 56.93%
screenshot-1.png18.65KB7.36KB▼ 60.51%
screenshot-2.png19.01KB8.18KB▼ 56.95%