84% rajce-embed

Code Review | Rajce embed

WordPress plugin Rajce embed scored 84% from 54 tests.

About plugin

  • Plugin page: rajce-embed
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.1
  • WordPress version: 5.8.1
  • First release: Jul 10, 2014
  • Latest release: Jan 13, 2016
  • Number of updates: 43
  • Update frequency: every 12.8 days
  • Top authors: honza.skypala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 3,374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼140.47ms] Passed 4 tests

This is a short check of server-side resources used by Rajce embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1241.99 ▲3.08
Dashboard /wp-admin3.18 ▲0.1250.51 ▼2.87
Posts /wp-admin/edit.php3.23 ▲0.1249.04 ▲0.72
Add New Post /wp-admin/post-new.php5.54 ▲0.1091.22 ▼562.79
Media Library /wp-admin/upload.php3.13 ▲0.1239.33 ▲6.05

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
rajce_embed_thumbnail_source
rajce_embed_thumbnail_crop
rajce_embed_image_captions
rajce_embed_omit_album_cover
rajce_embed_gallery_captions
rajce_embed_thumbnail_size_w
rajce_embed_version
rajce_embed_thumbnail_size_h

Browser metrics Passed 4 tests

Rajce embed: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲11315.95 ▲0.089.43 ▼0.6146.84 ▼7.20
Dashboard /wp-admin2,970 ▲395.92 ▼0.17144.75 ▼11.71121.56 ▼4.55
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0068.65 ▼1.17101.78 ▲8.48
Add New Post /wp-admin/post-new.php1,500 ▼18318.51 ▲0.27374.40 ▼34.94123.16 ▲8.32
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.02167.07 ▲1.57131.91 ▲8.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • rajce_embed_version
    • rajce_embed_thumbnail_crop
    • rajce_embed_omit_album_cover
    • rajce_embed_thumbnail_size_h
    • rajce_embed_image_captions
    • rajce_embed_thumbnail_size_w
    • rajce_embed_gallery_captions
    • rajce_embed_thumbnail_source

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/rajce-embed/wp-rajce.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/rajce-embed/rajce-embed.php on line 12
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/rajce-embed/rajce-embed.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rajce-embed/rajce-embed.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rajce-embed/wp-rajce.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rajce-embed/wp-rajce.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rajce-embed/rajce-embed.php:18
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/rajce-embed/wp-rajce.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: embed, images, image, oembed, gallery

rajce-embed/rajce-embed.php Passed 13 tests

Analyzing the main PHP file in "Rajce embed" version 1.5.1
80 characters long description:
Embeds photos and photo-albums stored on rajce.net as native WordPress galleries

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin593 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP27327520
CSS314072
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity59.00
▷ Minimum class complexity11.00
▷ Maximum class complexity107.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods1967.86%
▷ Public methods1760.71%
▷ Protected methods00.00%
▷ Private methods1139.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected