84% flyyer-previews

Code Review | FLYYER Previews

WordPress plugin FLYYER Previews scored84%from 54 tests.

About plugin

  • Plugin page: flyyer-previews
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.7
  • WordPress version: 6.3.1
  • First release: Aug 5, 2021
  • Latest release: Aug 6, 2021
  • Number of updates: 4
  • Update frequency: every 5.5 days
  • Top authors: fnmendez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 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.20MB] [CPU: ▼4.25ms] Passed 4 tests

This is a short check of server-side resources used by FLYYER Previews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1940.84 ▼1.77
Dashboard /wp-admin3.50 ▲0.2044.52 ▼3.93
Posts /wp-admin/edit.php3.61 ▲0.2646.17 ▼0.09
Add New Post /wp-admin/post-new.php6.10 ▲0.2281.82 ▼11.21
Media Library /wp-admin/upload.php3.42 ▲0.2036.33 ▲2.39

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
flyyer_previews_version
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for FLYYER Previews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.52 ▼0.748.29 ▲6.5742.83 ▲0.27
Dashboard /wp-admin2,229 ▲384.87 ▼1.0095.71 ▼7.7640.72 ▼0.20
Posts /wp-admin/edit.php2,109 ▲172.08 ▲0.0835.60 ▼1.2731.79 ▼0.93
Add New Post /wp-admin/post-new.php1,531 ▲1223.41 ▲0.35664.26 ▲62.4660.15 ▲5.43
Media Library /wp-admin/upload.php1,408 ▲204.21 ▲0.0293.65 ▼2.9742.38 ▼0.40

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • flyyer_previews_version
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/flyyer-previews/flyyer/tests/FlyyerRenderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/flyyer-previews/vendor/flyyer/flyyer/tests/FlyyerRenderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/flyyer-previews/vendor/flyyer/flyyer/tests/FlyyerTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/flyyer-previews/flyyer/tests/FlyyerTest.php:8

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Description of first screenshot named screenshot-1), #2 (Description of second screenshot named screenshot-2), #3 (Description of third screenshot named screenshot-3)
The official readme.txt might help

flyyer-previews/flyyer-previews.php 92% from 13 tests

The main PHP file in "FLYYER Previews" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 159 characters long)

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 detected1,240 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP122606911,080
Markdown1460122
JSON10036
JavaScript2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.14
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes857.14%
Methods97
▷ Static methods66.19%
▷ Public methods9496.91%
▷ Protected methods00.00%
▷ Private methods33.09%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
4 compressed PNG files occupy 0.19MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1344x500.png135.90KB136.18KB0.00%
assets/banner-772x250.png54.00KB54.10KB0.00%
assets/icon-256x256.png2.39KB2.39KB0.00%
assets/icon-128x128.png1.63KB1.63KB0.00%