88% infogram

Code Review | Infogram - Add charts, maps and infographics

WordPress plugin Infogram - Add charts, maps and infographics scored 88% from 54 tests.

About plugin

  • Plugin page: infogram
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.2-5.2.3
  • WordPress version: 5.8.1
  • First release: Sep 3, 2015
  • Latest release: Sep 24, 2019
  • Number of updates: 73
  • Update frequency: every 20.4 days
  • Top authors: torbjon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

3,000+ active / 49,335 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.06ms] Passed 4 tests

Server-side resources used by Infogram - Add charts, maps and infographics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.15 ▲10.30
Dashboard /wp-admin3.08 ▲0.0248.35 ▲4.95
Posts /wp-admin/edit.php3.13 ▲0.0244.19 ▲1.70
Add New Post /wp-admin/post-new.php5.43 ▼0.0087.16 ▼574.08
Media Library /wp-admin/upload.php3.02 ▲0.0233.08 ▼0.82
Infogram settings /wp-admin/options-general.php?page=infogram2.9928.06

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 117 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Infogram - Add charts, maps and infographics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.78 ▼0.119.37 ▲1.0450.24 ▲4.70
Dashboard /wp-admin2,975 ▲416.03 ▲0.09129.70 ▼18.14112.33 ▼2.17
Posts /wp-admin/edit.php2,741 ▲22.69 ▲0.0062.54 ▼4.3298.33 ▲4.34
Add New Post /wp-admin/post-new.php1,618 ▼25421.54 ▲2.35272.06 ▼108.38102.63 ▲0.04
Media Library /wp-admin/upload.php1,812 ▲25.01 ▼0.03144.08 ▼0.62120.35 ▲1.20
Infogram settings /wp-admin/options-general.php?page=infogram1,0642.0853.8670.00

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 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/infogram/core/rmccue/requests/bin/create_pear_package.php
  • 54× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Transport' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Transport/fsockopen.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Exception/HTTP/413.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Infogram\\InfogramSession' not found in wp-content/plugins/infogram/core/infogram/infogram/src/Infogram/RequestSigningSession.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Auth' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Auth/Basic.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Exception/HTTP/401.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Hooker' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Hooks.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Exception/HTTP/431.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Transport' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Transport/cURL.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'React\\Promise\\ExtendedPromiseInterface' not found in wp-content/plugins/infogram/core/react/promise/src/LazyPromise.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/infogram/core/rmccue/requests/library/Requests/Exception/HTTP/417.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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:
  • Screenshots: A description for screenshot #1 is missing in infogram/assets to your readme.txt
The official readme.txt is a good inspiration

infogram/infogram.php Passed 13 tests

Analyzing the main PHP file in "Infogram - Add charts, maps and infographics" version 1.6.1
59 characters long description:
It allows you to insert graphics from the site infogram.com

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin6,073 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP879943,1904,302
Markdown43830972
CSS15211376
JavaScript2158207
JSON300193
YAML20023

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity10.39
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces3
Interfaces12
Traits0
Classes65
▷ Abstract classes00.00%
▷ Concrete classes65100.00%
▷ Final classes00.00%
Methods289
▷ Static methods6020.76%
▷ Public methods24083.04%
▷ Protected methods3612.46%
▷ Private methods134.50%
Functions60
▷ Named functions2541.67%
▷ Anonymous functions3558.33%
Constants23
▷ Global constants00.00%
▷ Class constants23100.00%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
button/img/el-h.png0.07KB0.09KB0.00%
button/img/logow.png15.74KB1.86KB▼ 88.17%
button/img/fav.png2.46KB2.63KB0.00%
button/img/logo.png4.24KB2.14KB▼ 49.60%
button/img/top-back.png0.07KB0.09KB0.00%