10% colombia

Code Review | Colombia Ad Network

WordPress plugin Colombia Ad Network scored 10% from 54 tests.

About plugin

  • Plugin page: colombia
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: Feb 25, 2020
  • Number of updates: 6
  • Update frequency: every 2.0 days
  • Top authors: colombiaonline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 400 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/colombia/widget.php+57
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼73.82ms] Passed 4 tests

Analyzing server-side resources used by Colombia Ad Network
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.47 ▼50.27
Dashboard /wp-admin2.05 ▼1.266.15 ▼55.51
Posts /wp-admin/edit.php2.05 ▼1.315.13 ▼56.22
Add New Post /wp-admin/post-new.php2.05 ▼3.845.10 ▼133.27
Media Library /wp-admin/upload.php2.05 ▼1.187.31 ▼36.74

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_colombia
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Colombia Ad Network: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9814.37 ▲0.4014.18 ▲12.0254.88 ▼1.52
Dashboard /wp-admin2,209 ▲214.93 ▼0.98127.24 ▼9.3871.48 ▲2.89
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0838.31 ▼14.4633.68 ▼18.69
Add New Post /wp-admin/post-new.php1,680 ▲16022.21 ▼1.09756.66 ▼58.4759.10 ▼6.41
Media Library /wp-admin/upload.php1,394 ▲64.23 ▼0.03125.48 ▲22.4073.27 ▲23.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/colombia/widget.php+57
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_colombia
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/colombia/msg.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/colombia/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/colombia/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/colombia/colombia_settings.php:96
    • > PHP Warning
      Use of undefined constant CLMB_PLUGIN_URL - assumed 'CLMB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/colombia/colombia_settings.php on line 92

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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:
  • Tags: There are too many tags (26 tag instead of maximum 10)
You can take inspiration from this readme.txt

colombia/colombia.php 92% from 13 tests

The main PHP script in "Colombia Ad Network" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin290 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42717289
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.50
▷ Minimum class complexity5.00
▷ Maximum class complexity22.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/colombia_icon.png7.76KB3.36KB▼ 56.64%
img/question-mark.png1.20KB0.29KB▼ 75.73%
img/colombia.png0.75KB0.59KB▼ 21.53%