84% apppresser-amp-ad-injector

Code Review | Apppresser Amp Ad Injector

WordPress plugin Apppresser Amp Ad Injector scored84%from 54 tests.

About plugin

  • Plugin page: apppresser-amp-ad...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: Dec 9, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: guilhbr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Apppresser Amp Ad Injector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.50 ▲2.20
Dashboard /wp-admin3.32 ▼0.0253.87 ▼16.25
Posts /wp-admin/edit.php3.37 ▲0.0247.71 ▼8.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.36 ▼24.02
Media Library /wp-admin/upload.php3.25 ▲0.0239.64 ▼0.61
AppPresser AMP Ad Injector /wp-admin/options-general.php?page=apppresser-amp-ad-inserter3.2139.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Apppresser Amp Ad Injector: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.111.77 ▲0.0044.35 ▲2.50
Dashboard /wp-admin2,199 ▲225.65 ▲0.0695.32 ▼1.3141.51 ▼4.45
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0835.10 ▼3.7034.34 ▼2.54
Add New Post /wp-admin/post-new.php1,540 ▲1418.13 ▼5.47614.65 ▼69.8266.27 ▲11.25
Media Library /wp-admin/upload.php1,401 ▼24.22 ▲0.0294.64 ▼10.9845.15 ▼0.05
AppPresser AMP Ad Injector /wp-admin/options-general.php?page=apppresser-amp-ad-inserter8892.0025.9646.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/apppresser-amp-ad-injector/plugin.php:39

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: html, apppresser

apppresser-amp-ad-injector/plugin.php 92% from 13 tests

"Apppresser Amp Ad Injector" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("apppresser-amp-ad-injector.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin82 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171982

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin