83% aa-pdf-reader

Code Review | AA Pdf reader

WordPress plugin AA Pdf readerscored83%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: 6.3.1
  • 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 /1,202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.08ms] Passed 4 tests

Server-side resources used by AA Pdf reader
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.11 ▼1.47
Dashboard /wp-admin3.31 ▲0.0049.59 ▼1.53
Posts /wp-admin/edit.php3.36 ▲0.0056.37 ▲6.48
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.96 ▲0.60
Media Library /wp-admin/upload.php3.23 ▲0.0038.64 ▲2.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for AA Pdf reader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.261.80 ▲0.0448.81 ▲5.70
Dashboard /wp-admin2,195 ▲155.57 ▼0.1088.41 ▼3.4441.15 ▲0.79
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0141.36 ▲4.7234.81 ▼0.87
Add New Post /wp-admin/post-new.php1,525 ▼122.98 ▼0.15592.85 ▼81.1054.37 ▲1.30
Media Library /wp-admin/upload.php1,400 ▼34.12 ▼0.1196.80 ▲0.2043.40 ▲0.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > 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
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === AA Pdf reader=== )
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

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

This is the main PHP file of "AA Pdf reader" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main 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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16108

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
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

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