79% country-or-geo-location-based-page-content

Code Review | Country or Geo Location Based Page Content

WordPress plugin Country or Geo Location Based Page Content scored79%from 54 tests.

About plugin

  • Plugin page: country-or-geo-lo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2020
  • Latest release: Jul 9, 2020
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: shahala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /411 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Country or Geo Location Based Page Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.09 ▼34.11
Dashboard /wp-admin2.05 ▼1.265.59 ▼40.63
Posts /wp-admin/edit.php2.05 ▼1.316.12 ▼42.98
Add New Post /wp-admin/post-new.php2.05 ▼3.845.58 ▼92.10
Media Library /wp-admin/upload.php2.05 ▼1.185.02 ▼30.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Country or Geo Location Based Page Content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲17313.58 ▼1.179.24 ▲7.5647.10 ▲0.54
Dashboard /wp-admin2,209 ▲274.89 ▲0.02107.86 ▲7.4238.72 ▼3.86
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0138.89 ▼6.2235.03 ▼11.28
Add New Post /wp-admin/post-new.php1,542 ▲918.32 ▼4.67613.24 ▼81.9260.87 ▲14.39
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0594.87 ▼2.2043.49 ▼0.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: api, php, wp, geo, mysql

country-or-geo-location-based-page-content/Country-or-Geo-Location-Based-Page-Content.php 77% from 13 tests

The main PHP script in "Country or Geo Location Based Page Content" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path should use only dashes and lowercase characters ("/")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("country-or-geo-location-based-page-content.php" instead of "Country-or-Geo-Location-Based-Page-Content.php")
  • Domain Path: Prefix the domain path with a forward slash character ("//")

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 detected34 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP193017
JavaScript16211
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin