72% postadv

Code Review | Postadv

WordPress plugin Postadv scored72%from 54 tests.

About plugin

  • Plugin page: postadv
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Jul 2, 2017
  • Number of updates: 16
  • Update frequency: every 8.8 days
  • Top authors: ugene (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /692 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Postadv
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.72 ▼2.89
Dashboard /wp-admin3.31 ▲0.0143.70 ▼0.47
Posts /wp-admin/edit.php3.36 ▲0.0144.26 ▼1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.13 ▼12.47
Media Library /wp-admin/upload.php3.24 ▲0.0133.70 ▼0.51

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Postadv
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.49 ▲0.101.67 ▼0.2739.99 ▼1.59
Dashboard /wp-admin2,210 ▲195.86 ▲0.0095.60 ▼9.1936.68 ▼3.36
Posts /wp-admin/edit.php2,090 ▼22.02 ▲0.0038.46 ▼0.9338.74 ▲3.00
Add New Post /wp-admin/post-new.php6,245 ▲4,72121.85 ▼1.31826.46 ▲177.5053.05 ▼2.57
Media Library /wp-admin/upload.php1,392 ▲134.17 ▼0.0793.26 ▼4.9841.84 ▼3.02
Postadv /wp-admin/postadv.php260.440.0815.13

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/postadv/postadv.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/postadv/view/admin-settings.php:55

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/postadv.php
    • > Network (severe)
    wp-admin/postadv.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid URI: "#"
Please take inspiration from this readme.txt

postadv/postadv.php Passed 13 tests

The principal PHP file in "Postadv" v. 1.0.2 is loaded by WordPress automatically on each request
99 characters long description:
This plugin will help you to add the Adv. in your desired location as post content using shortcode.

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
Everything looks great! No dangerous files found in this plugin258 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46483258

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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