74% pictia

Code Review | Pictia plugin

WordPress plugin Pictia plugin scored 74% from 54 tests.

About plugin

  • Plugin page: pictia
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Jan 5, 2021
  • Number of updates: 11
  • Update frequency: every 1.9 days
  • Top authors: pictia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 342 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.95MB] [CPU: ▼50.26ms] Passed 4 tests

Server-side resources used by Pictia plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.66 ▼34.43
Dashboard /wp-admin2.06 ▼1.245.22 ▼41.33
Posts /wp-admin/edit.php2.06 ▼1.306.18 ▼42.49
Add New Post /wp-admin/post-new.php2.06 ▼3.835.29 ▼82.77
Media Library /wp-admin/upload.php2.06 ▼1.175.45 ▼30.64

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pictia plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,026 ▲29115.46 ▲0.8711.42 ▲9.8249.76 ▲5.05
Dashboard /wp-admin2,327 ▲1396.19 ▲1.10117.51 ▲10.5446.29 ▲4.77
Posts /wp-admin/edit.php2,213 ▲1242.82 ▲0.7847.45 ▲12.4240.94 ▲7.01
Add New Post /wp-admin/post-new.php6,633 ▲5,11623.25 ▲5.71993.38 ▲397.2169.36 ▲17.39
Media Library /wp-admin/upload.php1,509 ▲1185.43 ▲1.25109.21 ▲5.7449.22 ▲2.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the pictia handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/pictia/pictia.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: pictia, protection, licensing, photography, copyright...

pictia/pictia.php Passed 13 tests

This is the main PHP file of "Pictia plugin" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
92 characters long description:
Pictia plugin recognizes certified images on Pictia and opens an information and sale panel.

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
No dangerous file extensions were detected3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1373

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin