89% sell-photo

Code Review | Sell Photo

WordPress plugin Sell Photo scored89%from 54 tests.

About plugin

  • Plugin page: sell-photo
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2014
  • Latest release: Sep 11, 2023
  • Number of updates: 22
  • Update frequency: every 146.8 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /6,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.78ms] Passed 4 tests

Server-side resources used by Sell Photo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.37 ▲1.40
Dashboard /wp-admin3.38 ▲0.0854.69 ▲1.29
Posts /wp-admin/edit.php3.43 ▲0.0849.95 ▼2.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.26 ▼23.83
Media Library /wp-admin/upload.php3.31 ▲0.0832.82 ▼2.28
Sell Photo /wp-admin/options-general.php?page=sell-photo-settings3.2734.68

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-posts
sell_photo_button_anchor
can_compress_scripts
sell_photo_currency_code
sell_photo_return_url
theysaidso_admin_options
sell_photo_price_amount
db_upgraded
sell_photo_plugin_version
sell_photo_paypal_email
...

Browser metrics Passed 4 tests

Sell Photo: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.311.92 ▲0.0743.99 ▲0.56
Dashboard /wp-admin2,213 ▲314.80 ▼1.05111.68 ▲7.7244.41 ▲1.64
Posts /wp-admin/edit.php2,093 ▲12.00 ▲0.0136.91 ▼2.7836.06 ▼2.95
Add New Post /wp-admin/post-new.php1,525 ▼323.41 ▲0.29676.35 ▲52.2762.80 ▲9.49
Media Library /wp-admin/upload.php1,395 ▲104.23 ▲0.04100.65 ▲2.3147.28 ▲4.17
Sell Photo /wp-admin/options-general.php?page=sell-photo-settings8952.0526.5130.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 12 options
    • sell_photo_return_url
    • sell_photo_paypal_email
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • sell_photo_currency_code
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • sell_photo_button_anchor
    • ...

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

sell-photo/main.php 92% from 13 tests

"Sell Photo" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sell-photo.php" instead of "main.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
There were no executable files found in this plugin426 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14835426

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin