77% geoedge-ad-security

Code Review | Geoedge

WordPress plugin Geoedge scored77%from 54 tests.

About plugin

  • Plugin page: geoedge-ad-security
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.2
  • WordPress version: 6.3.1
  • First release: Aug 7, 2019
  • Latest release: Aug 13, 2019
  • Number of updates: 10
  • Update frequency: every 0.8 days
  • Top authors: geoedge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.86ms] Passed 4 tests

An overview of server-side resources used by Geoedge
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.44 ▼0.44
Dashboard /wp-admin3.36 ▲0.0243.26 ▼12.31
Posts /wp-admin/edit.php3.48 ▲0.1250.28 ▲6.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.90 ▼0.59
Media Library /wp-admin/upload.php3.29 ▲0.0634.52 ▲1.92
GeoEdge Ad Security /wp-admin/options-general.php?page=geoedge3.2329.69

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
geoedge_settings
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Geoedge
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.45 ▼1.301.86 ▲0.2741.43 ▲2.55
Dashboard /wp-admin2,215 ▲265.80 ▲0.8194.59 ▼26.5939.88 ▼5.45
Posts /wp-admin/edit.php2,101 ▲122.04 ▼0.0243.49 ▲7.8138.70 ▲6.61
Add New Post /wp-admin/post-new.php1,534 ▲1518.27 ▼4.80592.82 ▼81.8053.43 ▲3.97
Media Library /wp-admin/upload.php1,400 ▲124.29 ▲0.0998.27 ▲0.0044.84 ▲1.45
GeoEdge Ad Security /wp-admin/options-general.php?page=geoedge9362.1026.4352.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=geoedge
    • > Notice in wp-content/plugins/geoedge-ad-security/admin/class-admin.php+47
    Undefined index: api-key

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/geoedge-ad-security/admin/partials/view.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

geoedge-ad-security/geoedge.php 69% from 13 tests

"Geoedge" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("geoedge-ad-security.php" instead of "geoedge.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 165 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 plugin522 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10107131321
CSS1403163
JavaScript120538

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.14
Average class complexity3.17
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/geoedge-logo.png41.06KB21.23KB▼ 48.31%