94% thirstyaffiliates-for-foogallery-extension

Code Review | ThirstyAffiliates For FooGallery Extension

WordPress plugin ThirstyAffiliates For FooGallery Extension scored 94% from 54 tests.

About plugin

  • Plugin page: thirstyaffiliates...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7
  • WordPress version: 5.8.1
  • First release: Aug 1, 2014
  • Latest release: Jan 9, 2017
  • Number of updates: 10
  • Update frequency: every 97.3 days
  • Top authors: jkohlbach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 7,185 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼141.99ms] Passed 4 tests

Analyzing server-side resources used by ThirstyAffiliates For FooGallery Extension
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1439.06 ▲18.13
Dashboard /wp-admin3.08 ▲0.0346.87 ▲0.31
Posts /wp-admin/edit.php3.13 ▲0.0248.52 ▼0.82
Add New Post /wp-admin/post-new.php5.44 ▲0.0089.52 ▼570.06
Media Library /wp-admin/upload.php3.02 ▲0.0235.93 ▲2.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ThirstyAffiliates For FooGallery Extension
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6615.84 ▲0.2210.19 ▲0.0649.33 ▲4.53
Dashboard /wp-admin2,964 ▲306.10 ▼0.16160.20 ▲11.53107.33 ▲2.84
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0063.50 ▼1.9486.89 ▲1.05
Add New Post /wp-admin/post-new.php1,676 ▼718.87 ▲0.55412.93 ▼3.47111.70 ▼9.17
Media Library /wp-admin/upload.php1,751 ▼565.01 ▼0.01151.09 ▼7.60110.65 ▼2.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/thirstyaffiliates-for-foogallery-extension/thirstyaffiliates-for-foogallery-extension.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/thirstyaffiliates-for-foogallery-extension/thirstyaffiliates-for-foogallery-init.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% 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:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

thirstyaffiliates-for-foogallery-extension/thirstyaffiliates-for-foogallery-extension.php Passed 13 tests

"ThirstyAffiliates For FooGallery Extension" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
95 characters long description:
Lets you create galleries of images that link to affiliate links (powered by ThirstyAffiliates)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin141 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2323284
JavaScript111839
CSS12018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/extension_bg.png149.04KB59.09KB▼ 60.35%
assets/icon-aff.png4.26KB0.76KB▼ 82.24%