78% tagregator

Code Review | Tagregator

WordPress plugin Tagregator scored78%from 54 tests.

About plugin

  • Plugin page: tagregator
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 6.3.1
  • First release: Sep 17, 2013
  • Latest release: Aug 6, 2015
  • Number of updates: 170
  • Update frequency: every 19.4 days
  • Top authors: iandunn (92.94%)ryelle (4.12%)coreymckrill (3.53%)Otto42 (1.18%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /9,709 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.46MB] [CPU: ▼4.24ms] Passed 4 tests

Analyzing server-side resources used by Tagregator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5043.53 ▲7.86
Dashboard /wp-admin3.80 ▲0.4648.86 ▼8.31
Posts /wp-admin/edit.php3.85 ▲0.5048.13 ▲1.42
Add New Post /wp-admin/post-new.php6.34 ▲0.4586.59 ▼15.97
Media Library /wp-admin/upload.php3.66 ▲0.4339.12 ▲5.89
Instagram Media /wp-admin/edit.php?post_type=tggr-instagram3.7640.70
Hashtags /wp-admin/edit-tags.php?taxonomy=hashtag3.6536.00
Flickr Posts /wp-admin/edit.php?post_type=tggr-flickr3.7636.83
Settings /wp-admin/admin.php?page=tggr_settings3.6336.50
Tweets /wp-admin/edit.php?post_type=tggr-tweets3.7636.94
Google+ Activities /wp-admin/edit.php?post_type=tggr-google3.7637.44

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
tggr_settings
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Tagregator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲21114.00 ▼0.3710.95 ▲9.0342.46 ▲0.81
Dashboard /wp-admin2,259 ▲744.86 ▼1.01100.29 ▼2.1639.07 ▼8.61
Posts /wp-admin/edit.php2,124 ▲352.03 ▲0.0034.61 ▼6.1132.29 ▼3.94
Add New Post /wp-admin/post-new.php1,561 ▲2617.77 ▼5.49670.30 ▲63.5759.57 ▲2.32
Media Library /wp-admin/upload.php1,441 ▲504.31 ▲0.1995.58 ▼6.6741.84 ▼6.69
Instagram Media /wp-admin/edit.php?post_type=tggr-instagram1,1151.9934.0129.99
Hashtags /wp-admin/edit-tags.php?taxonomy=hashtag1,2902.1325.4030.41
Flickr Posts /wp-admin/edit.php?post_type=tggr-flickr1,1181.9930.5429.48
Settings /wp-admin/admin.php?page=tggr_settings9532.0526.0830.37
Tweets /wp-admin/edit.php?post_type=tggr-tweets1,1001.9633.1429.79
Google+ Activities /wp-admin/edit.php?post_type=tggr-google1,1151.9730.1429.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • tggr_settings
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 14× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/tagregator/classes/tggr-shortcode-tagregator.php
    • > /wp-content/plugins/tagregator/views/tggr-source-flickr/page-settings-section-header.php
    • > /wp-content/plugins/tagregator/classes/tagregator.php
    • > /wp-content/plugins/tagregator/classes/tggr-module.php
    • > /wp-content/plugins/tagregator/views/tggr-source-twitter/page-settings-section-header.php
    • > /wp-content/plugins/tagregator/classes/tggr-source-flickr.php
    • > /wp-content/plugins/tagregator/classes/tggr-source-instagram.php
    • > /wp-content/plugins/tagregator/views/tggr-source-instagram/page-settings-section-header.php
    • > /wp-content/plugins/tagregator/classes/tggr-source-twitter.php
    • > /wp-content/plugins/tagregator/classes/tggr-source-google.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/tagregator/views/tggr-source-flickr/shortcode-tagregator-media-item.php:1
    • > PHP Warning
      Use of undefined constant TGGR_NAME - assumed 'TGGR_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/tagregator/views/requirements-error.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/tagregator/views/tggr-source-instagram/shortcode-tagregator-media-item.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tagregator/views/tggr-source-instagram/page-settings-fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tagregator/views/tggr-source-twitter/page-settings-fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tagregator/views/requirements-error.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tagregator/views/tggr-settings/page-log.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tagregator/views/tggr-settings/page-settings.php:3
    • > PHP Warning
      Use of undefined constant TGGR_REQUIRED_PHP_VERSION - assumed 'TGGR_REQUIRED_PHP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/tagregator/views/requirements-error.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tagregator/views/tggr-source-google/page-settings-fields.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #2, #3 in tagregator/assets to your readme.txt
You can take inspiration from this readme.txt

tagregator/bootstrap.php 92% from 13 tests

Analyzing the main PHP file in "Tagregator" version 0.6
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tagregator.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,697 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP234068661,634
CSS2335564
SVG100399
JavaScript13177100

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.00
▷ Minimum class complexity5.00
▷ Maximum class complexity36.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods129
▷ Static methods4031.01%
▷ Public methods9472.87%
▷ Protected methods3527.13%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants40
▷ Global constants37.50%
▷ Class constants3792.50%
▷ Public constants37100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/source-logos/instagram.png3.29KB3.13KB▼ 4.93%
images/source-logos/flickr.png0.92KB1.01KB0.00%
images/source-logos/twitter.png1.10KB1.20KB0.00%
images/source-logos/google-plus.png1.96KB1.63KB▼ 16.81%