83% camptix-automatic-gravatar-fetch-and-export

Code Review | Camptix - Gravatar Fetch and Export

WordPress plugin Camptix - Gravatar Fetch and Export scored83%from 54 tests.

About plugin

  • Plugin page: camptix-automatic...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 24, 2015
  • Latest release: Jan 24, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: bansod_deven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /922 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.57ms] Passed 4 tests

Analyzing server-side resources used by Camptix - Gravatar Fetch and Export
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.35 ▲0.54
Dashboard /wp-admin3.31 ▲0.0151.07 ▲0.50
Posts /wp-admin/edit.php3.36 ▲0.0048.63 ▼3.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.07 ▼12.28
Media Library /wp-admin/upload.php3.23 ▲0.0041.08 ▲3.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Camptix - Gravatar Fetch and Export
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.161.73 ▼0.1746.49 ▲2.76
Dashboard /wp-admin2,198 ▲215.68 ▲0.0287.40 ▼0.1336.65 ▼10.36
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0346.24 ▲6.0737.75 ▼3.65
Add New Post /wp-admin/post-new.php1,526 ▼223.32 ▲0.14688.02 ▲14.6756.72 ▲4.36
Media Library /wp-admin/upload.php1,394 ▼04.15 ▼0.0597.03 ▼3.1744.88 ▲0.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/camptix-automatic-gravatar-fetch-and-export/camptix.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CampTix_Addon' not found in wp-content/plugins/camptix-automatic-gravatar-fetch-and-export/classes/fetch-export-gravatars.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
  • Screenshots: Please add an image for screenshot #1 (Tickets > Tools > Gravatar Fetch and Export)
Please take inspiration from this readme.txt

camptix-automatic-gravatar-fetch-and-export/camptix.php 92% from 13 tests

The principal PHP file in "Camptix - Gravatar Fetch and Export" v. 0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("camptix-automatic-gravatar-fetch-and-export.php" instead of "camptix.php")

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
No dangerous file extensions were detected416 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP213256416

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png176.70KB65.41KB▼ 62.98%