83% postamp

Code Review | POST AMP

WordPress plugin POST AMP scored83%from 54 tests.

About plugin

  • Plugin page: postamp
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Feb 1, 2018
  • Latest release: Feb 1, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: gokulakrishnan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by POST AMP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0622.83 ▼18.09
Dashboard /wp-admin3.32 ▼0.0245.62 ▼15.08
Posts /wp-admin/edit.php3.37 ▲0.0250.93 ▲3.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.76 ▼11.48
Media Library /wp-admin/upload.php3.24 ▲0.0234.42 ▼4.12

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

POST AMP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.24 ▼0.311.88 ▲0.3137.40 ▼4.52
Dashboard /wp-admin2,198 ▲185.58 ▼0.0383.34 ▼1.7236.05 ▼5.13
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0139.49 ▲5.5435.05 ▼3.00
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▲0.20705.98 ▲19.5057.80 ▲2.15
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.1098.85 ▼6.6942.72 ▼6.27

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

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/postamp/postamp.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/postamp/templates/post.amp.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: No tags were detected
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

postamp/postamp.php 92% from 13 tests

The main PHP script in "POST AMP" version 0.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,600 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2460221,945
CSS143111,655

PHP code Passed 2 tests

Analyzing 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.25
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected