78% wp-just-ads

Code Review | WP Just ADS

WordPress plugin WP Just ADS scored 78% from 54 tests.

About plugin

  • Plugin page: wp-just-ads
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 6.3.1
  • First release: Jan 20, 2014
  • Latest release: Jan 27, 2014
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: Konstantinos_Tsatsarounos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,008 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.38MB] [CPU: ▼24.23ms] Passed 4 tests

A check of server-side resources used by WP Just ADS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.98 ▼0.4815.92 ▼24.53
Dashboard /wp-admin3.40 ▲0.1035.86 ▼15.25
Posts /wp-admin/edit.php3.34 ▼0.0129.97 ▼15.88
Add New Post /wp-admin/post-new.php4.78 ▼1.1162.44 ▼41.26
Media Library /wp-admin/upload.php3.42 ▲0.1936.88 ▼2.11
New Advertisement /wp-admin/post-new.php?post_type=jads3.5667.06
All Advertisements /wp-admin/edit.php?post_type=jads3.3430.25
Category /wp-admin/edit-tags.php?taxonomy=ads_tax&post_type=jads3.4132.16
Settings /wp-admin/edit.php?post_type=jads&page=jads_settings_page3.3932.94

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Just ADS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,050 ▲31514.35 ▼0.2123.29 ▲21.5839.76 ▼10.18
Dashboard /wp-admin2,251 ▲594.95 ▲0.03100.56 ▼8.8379.43 ▲37.55
Posts /wp-admin/edit.php2,140 ▲512.04 ▼0.1040.21 ▲3.9637.67 ▲5.31
Add New Post /wp-admin/post-new.php1,578 ▲6418.44 ▲0.73675.35 ▼0.2862.67 ▲7.35
Media Library /wp-admin/upload.php1,427 ▲394.21 ▲0.0297.35 ▼7.5474.88 ▲27.20
New Advertisement /wp-admin/post-new.php?post_type=jads2,6617.90182.73117.74
All Advertisements /wp-admin/edit.php?post_type=jads1,1342.0232.2831.66
Category /wp-admin/edit-tags.php?taxonomy=ads_tax&post_type=jads1,3012.1425.5728.51
Settings /wp-admin/edit.php?post_type=jads&page=jads_settings_page8742.0326.4527.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=jads
    • > Warning in wp-includes/class-wp-hook.php+310
    Parameter 2 to jads_title_like_posts_where() expected to be a reference, value given

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-just-ads/includes/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-just-ads/includes/classes/ajaxed_status.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-just-ads/justads.php:44

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: You can look at the official readme.txt

wp-just-ads/justads.php 92% from 13 tests

Analyzing the main PHP file in "WP Just ADS" version 1.11
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-just-ads.php" instead of "justads.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
Success! There were no dangerous files found in this plugin3,599 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
CSS699571,833
PHP212311081,289
JavaScript44717315
PO File14545107
SVG10055

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity5.00
▷ Maximum class complexity20.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods3797.37%
▷ Protected methods00.00%
▷ Private methods12.63%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.68MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/refresh.png1.47KB1.00KB▼ 31.98%
images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
screenshots/WP-Just-Ads.1.png395.54KB124.85KB▼ 68.44%
images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%