84% retina-2x

Code Review | Retina @2x

WordPress plugin Retina @2x scored84%from 54 tests.

About plugin

  • Plugin page: retina-2x
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: May 13, 2017
  • Number of updates: 51
  • Update frequency: every 7.1 days
  • Top authors: WouterPostmaNL (72.55%)WordPress Lounge (29.41%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /9,498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Retina @2x
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.41 ▼0.74
Dashboard /wp-admin3.31 ▼0.0448.19 ▼14.00
Posts /wp-admin/edit.php3.36 ▲0.0049.90 ▼3.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.70 ▼8.87
Media Library /wp-admin/upload.php3.23 ▲0.0038.19 ▲5.63

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Retina @2x
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲13513.59 ▼0.595.43 ▲3.4639.64 ▼0.10
Dashboard /wp-admin2,218 ▲155.81 ▼0.0599.78 ▼2.9441.21 ▲0.58
Posts /wp-admin/edit.php2,079 ▼211.99 ▼0.0238.79 ▼1.8436.27 ▼4.28
Add New Post /wp-admin/post-new.php1,549 ▲523.38 ▲0.26599.11 ▼34.8855.67 ▼6.12
Media Library /wp-admin/upload.php1,394 ▼64.27 ▲0.05103.16 ▲0.1242.49 ▼4.25

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/retina-2x/retina.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: ipad, retina, ios, images, iphone...

retina-2x/retina.php 92% from 13 tests

The entry point to "Retina @2x" version 1.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("retina-2x.php" instead of "retina.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13114137
PHP1488

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin