93% aa-pdf-reader

Code Review | AA Pdf reader

WordPress plugin AA Pdf readerscored 93% from 54 tests.

About plugin

  • Plugin page: aa-pdf-reader
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 5.9.2
  • First release: Dec 19, 2014
  • Latest release: Dec 19, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: aaextention (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 971 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼314.69ms] Passed 4 tests

An overview of server-side resources used by AA Pdf reader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.49 ▲2.63
Dashboard /wp-admin3.41 ▲0.0133.15 ▲1.23
Posts /wp-admin/edit.php3.65 ▲0.0136.54 ▼6.37
Add New Post /wp-admin/post-new.php6.91 ▼0.0995.02 ▼1,253.22
Media Library /wp-admin/upload.php3.30 ▲0.0025.50 ▼0.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AA Pdf reader
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲2116.05 ▲0.005.75 ▼0.472.26 ▼0.08
Dashboard /wp-admin2,895 ▲346.11 ▼0.09124.00 ▼11.73159.14 ▼5.56
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0162.04 ▼8.48137.94 ▼30.62
Add New Post /wp-admin/post-new.php1,760 ▲9917.16 ▲1.63436.45 ▼0.66158.48 ▲6.45
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.05147.06 ▼2.79188.70 ▲1.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/aa-pdf-reader/pdfreader.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Contributors: Contributors not specified
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === AA Pdf reader=== )
You can look at the official readme.txt

aa-pdf-reader/pdfreader.php 92% from 13 tests

"AA Pdf reader" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aa-pdf-reader.php" instead of "pdfreader.php")

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

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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