10% wp-post-advertisement

Code Review | WP Post Advertisement

WordPress plugin WP Post Advertisement scored10%from 54 tests.

About plugin

  • Plugin page: wp-post-advertise...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.3
  • WordPress version: 6.3.1
  • First release: Jun 12, 2017
  • Latest release: Jun 12, 2017
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: ifourkuldeep1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /526 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wp_post_advertisement::my_plugin_create_db() should not be called statically

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.85ms] Passed 4 tests

Server-side resources used by WP Post Advertisement
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.22 ▼2.36
Dashboard /wp-admin3.35 ▲0.0548.17 ▼2.29
Posts /wp-admin/edit.php3.40 ▲0.0544.88 ▼4.82
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.66 ▼1.92
Media Library /wp-admin/upload.php3.28 ▲0.0535.20 ▲1.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_post_advertisement
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Post Advertisement
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6513.62 ▼1.114.64 ▲2.3040.29 ▼6.51
Dashboard /wp-admin2,221 ▲304.81 ▼1.1298.19 ▼6.0639.71 ▼6.61
Posts /wp-admin/edit.php2,104 ▲152.03 ▼0.0135.76 ▼0.7733.83 ▼3.93
Add New Post /wp-admin/post-new.php1,543 ▲1023.26 ▲0.11634.67 ▼10.4244.77 ▼8.86
Media Library /wp-admin/upload.php1,409 ▲214.18 ▼0.0598.86 ▲4.2443.69 ▲2.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wp_post_advertisement::wpa_deactivation_hook() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 your attention: The official readme.txt might help

wp-post-advertisement/wp-post-advertisement.php Passed 13 tests

The main PHP script in "WP Post Advertisement" version 1.0 is automatically included on every request by WordPress
61 characters long description:
WP Post Advertisement create exit advertisement in your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin343 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP110173269
CSS17374

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin