83% simple-ads-posting

Code Review | Simple Ads Posting

WordPress plugin Simple Ads Posting scored 83% from 54 tests.

About plugin

  • Plugin page: simple-ads-posting
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Mar 1, 2015
  • Number of updates: 29
  • Update frequency: every 19.0 days
  • Top authors: rosdyana.kusuma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,809 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Simple Ads Posting
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.24 ▼0.25
Dashboard /wp-admin3.32 ▲0.0152.61 ▲5.72
Posts /wp-admin/edit.php3.37 ▲0.0149.08 ▲4.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.91 ▲3.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.93 ▼1.06
Simple Ads Setting /wp-admin/options-general.php?page=simple-ads-posting3.2232.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Ads Posting
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.48 ▼0.272.00 ▲0.1444.89 ▼1.84
Dashboard /wp-admin2,213 ▲254.88 ▼0.0196.22 ▼5.1539.20 ▼7.85
Posts /wp-admin/edit.php2,093 ▲71.99 ▲0.0233.49 ▼3.5132.92 ▼1.68
Add New Post /wp-admin/post-new.php1,517 ▼1617.66 ▼5.75676.64 ▼36.0867.05 ▲12.71
Media Library /wp-admin/upload.php1,392 ▲14.14 ▼0.10102.38 ▼5.0244.68 ▼5.58
Simple Ads Setting /wp-admin/options-general.php?page=simple-ads-posting8232.0424.9425.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-ads-posting/simple-ads-admin.php
    • > /wp-content/plugins/simple-ads-posting/simple_ads_posting.php
    • > /wp-content/plugins/simple-ads-posting/simple-ads-main.php
    • > /wp-content/plugins/simple-ads-posting/simple-ads-credit.php

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screen shot for setting page of the plugin, you can set your ads code here.), #2 (Screen shot for posting page, put the shortcode [ads] or [ads2] any place in your posting as you wish.)
You can look at the official readme.txt

simple-ads-posting/simple_ads_posting.php 92% from 13 tests

The main file in "Simple Ads Posting" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-ads-posting.php" instead of "simple_ads_posting.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
No dangerous file extensions were detected381 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File45562236
PHP54530145

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/email.png1.65KB0.54KB▼ 67.02%
images/gplus.png1.93KB0.82KB▼ 57.71%
plugin_setting.png19.11KB6.73KB▼ 64.79%
images/twitter.png3.58KB0.79KB▼ 77.98%
posting_page.png20.02KB9.22KB▼ 53.94%