84% text-advertisements

Code Review | Text Advertisements

WordPress plugin Text Advertisements scored84%from 54 tests.

About plugin

  • Plugin page: text-advertisements
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 6, 2013
  • Latest release: Apr 4, 2018
  • Number of updates: 12
  • Update frequency: every 139.3 days
  • Top authors: picor.ir (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /7,921 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
Install script ran successfully

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

This is a short check of server-side resources used by Text Advertisements
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.98 ▲4.97
Dashboard /wp-admin3.35 ▲0.0544.75 ▼3.50
Posts /wp-admin/edit.php3.40 ▲0.0544.57 ▲0.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.58 ▼9.24
Media Library /wp-admin/upload.php3.27 ▲0.0536.81 ▲5.16
باگ های امنیتی /wp-admin/admin.php?page=textads_security3.2432.61
Add new advertisement /wp-admin/post-new.php?post_type=textads3.3143.20
افزونه و قالب ها /wp-admin/admin.php?page=textads_security_plugins_themes3.2630.98
پکیج های آموزشی /wp-admin/admin.php?page=textads_security_packages3.2432.03
text advertisements /wp-admin/edit.php?post_type=textads3.3133.87

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text Advertisements
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲13013.14 ▼1.131.77 ▲0.1340.01 ▼2.32
Dashboard /wp-admin2,269 ▲805.82 ▲0.87113.28 ▲7.7283.49 ▲41.93
Posts /wp-admin/edit.php2,146 ▲572.06 ▲0.0536.31 ▲2.7440.95 ▲6.85
Add New Post /wp-admin/post-new.php1,565 ▲3617.51 ▼0.84716.77 ▲92.8156.75 ▼1.26
Media Library /wp-admin/upload.php1,448 ▲574.25 ▲0.0096.39 ▼3.7183.41 ▲40.96
باگ های امنیتی /wp-admin/admin.php?page=textads_security9622.0223.9954.42
Add new advertisement /wp-admin/post-new.php?post_type=textads1,5982.6046.5364.25
افزونه و قالب ها /wp-admin/admin.php?page=textads_security_plugins_themes1,1922.1522.8947.85
پکیج های آموزشی /wp-admin/admin.php?page=textads_security_packages9742.0328.6239.25
text advertisements /wp-admin/edit.php?post_type=textads1,1131.9433.0735.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/text-advertisements/textads_packages.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-advertisements/textads_menu_setup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/text-advertisements/includes/posttype.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/text-advertisements/textads_pluginsthemes.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/text-advertisements/textads_bugs.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-advertisements/includes/metaboxes.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-advertisements/textads_menu_setup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/text-advertisements/includes/shortcodes.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Screen shot (screenshot-1.png) English add new advertisement.), #2 (Screen shot (screenshot-2.png) English widget advertisement preview.), #3 (Screen shot (screenshot-3.png) Persian add new advertisement.), #4 (Screen shot (screenshot-4.png) Persian widget advertisement preview.)
Please take inspiration from this readme.txt

text-advertisements/Text-Advertisements.php 92% from 13 tests

The primary PHP file in "Text Advertisements" version 2.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("text-advertisements.php" instead of "Text-Advertisements.php")

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
No dangerous file extensions were detected666 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8779552
PO File2303492
CSS10022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/plugins/jahanpayl-wordpress-edd-gateway-with-sms.png31.54KB13.14KB▼ 58.33%
images/packages/wordpress-theme-plugins-translation-package.png48.66KB18.49KB▼ 61.99%
screenshot-2.png6.22KB2.34KB▼ 62.32%
screenshot-3.png6.22KB2.37KB▼ 61.92%
images/themes/beetube.png53.93KB21.16KB▼ 60.75%