74% getty-images

Code Review | Getty Images

WordPress plugin Getty Images scored74%from 54 tests.

About plugin

  • Plugin page: getty-images
  • Plugin version: 4.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: May 4, 2023
  • Number of updates: 115
  • Update frequency: every 29.5 days
  • Top authors: bendoh (32.17%)afiler (25.22%)pgauna (17.39%)giggrasso (7.83%)agerritse (5.22%)

Code review

54 tests

User reviews

24 reviews

Install metrics

2,000+ active /100,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.08ms] Passed 4 tests

Analyzing server-side resources used by Getty Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1535.04 ▼2.65
Dashboard /wp-admin3.45 ▲0.1442.73 ▼5.46
Posts /wp-admin/edit.php3.57 ▲0.2147.56 ▲0.22
Add New Post /wp-admin/post-new.php6.07 ▲0.1897.18 ▲9.81
Media Library /wp-admin/upload.php3.48 ▲0.2537.07 ▲3.57

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Getty Images: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.04 ▼0.311.57 ▼0.0237.67 ▼4.77
Dashboard /wp-admin2,202 ▲225.62 ▼0.0091.01 ▲4.1442.43 ▼0.77
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0338.05 ▲3.0637.49 ▲2.81
Add New Post /wp-admin/post-new.php6,403 ▲4,87723.28 ▲0.13924.08 ▲246.2138.18 ▼13.73
Media Library /wp-admin/upload.php1,485 ▲914.23 ▲0.0097.00 ▲1.0945.77 ▲1.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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 items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/getty-images/getty-templates.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getty-images/getty-images.php:72

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: image library, getty, media, images

getty-images/getty-images.php Passed 13 tests

The entry point to "Getty Images" version 4.1.0 is a PHP file that has certain tags in its header comment area
37 characters long description:
Integrate your site with Getty Images

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/getty-images/dev_local_setup.bat
8,572 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript199181,1144,663
SVG5621,334
CSS12183461,333
PHP22461951,193
HTML212048
DOS Batch1101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/x-2x.png0.21KB0.21KB▼ 3.64%
images/getty-logo-large.png17.15KB10.80KB▼ 37.06%
images/getty-logo.png3.07KB2.50KB▼ 18.65%
images/getty-images-logo.png6.99KB5.34KB▼ 23.59%
images/arrows-small-2x.png0.95KB0.83KB▼ 12.90%