78% ps-ads-pro

Code Review | Ps Ads Pro

WordPress plugin Ps Ads Pro scored78%from 54 tests.

About plugin

  • Plugin page: ps-ads-pro
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Jun 5, 2018
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: shankhadev123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.72ms] Passed 4 tests

This is a short check of server-side resources used by Ps Ads Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.72 ▼5.43
Dashboard /wp-admin3.43 ▲0.1246.65 ▼6.84
Posts /wp-admin/edit.php3.54 ▲0.1953.48 ▲4.99
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.12 ▼15.67
Media Library /wp-admin/upload.php3.35 ▲0.1238.96 ▼2.92
All Ads /wp-admin/edit.php?post_type=ps_ads_pro3.3937.49
Settings /wp-admin/admin.php?page=ps_ads_pro_settings3.3232.29

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_ps_ads_pro_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ps Ads Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲20913.72 ▼0.705.76 ▲3.4844.59 ▲0.86
Dashboard /wp-admin2,247 ▲595.92 ▲0.02108.66 ▼2.1243.47 ▼4.62
Posts /wp-admin/edit.php2,133 ▲442.10 ▲0.0635.37 ▼7.3435.93 ▼2.35
Add New Post /wp-admin/post-new.php1,552 ▲3823.18 ▲5.74685.42 ▲31.8961.20 ▲7.81
Media Library /wp-admin/upload.php1,435 ▲474.29 ▲0.0395.31 ▼18.6743.27 ▼4.34
All Ads /wp-admin/edit.php?post_type=ps_ads_pro1,1302.0434.1329.94
Settings /wp-admin/admin.php?page=ps_ads_pro_settings8061.9126.4523.84

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_ps_ads_pro_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ps-ads-pro/admin/partials/ps-ads-pro-admin-display.php
    • > /wp-content/plugins/ps-ads-pro/public/partials/ps-ads-pro-public-display.php
  • 4× 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/ps-ads-pro/admin/partials/ps-ads-pro-info-meta-box.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ps-ads-pro/admin/partials/ps-ads-pro-schedule-meta-box.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ps-ads-pro/admin/partials/ps-ads-pro-meta-box.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ps-ads-pro/includes/class-ps-ads-pro-widget.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Backend) image missing
You can take inspiration from this readme.txt

ps-ads-pro/ps-ads-pro.php Passed 13 tests

This is the main PHP file of "Ps Ads Pro" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
79 characters long description:
PS Ads Pro Plugin is used to managed the ads and banner in the wordpress sites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected543 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP17189700495
CSS25833
JavaScript245415

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.12
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3583.33%
▷ Protected methods00.00%
▷ Private methods716.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin