93% themeforest-check

Code Review | ThemeForest-Check

WordPress plugin ThemeForest-Check scored 93% from 54 tests.

About plugin

  • Plugin page: themeforest-check
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 5.9.2
  • First release: Jul 12, 2013
  • Latest release: Aug 26, 2013
  • Number of updates: 15
  • Update frequency: every 3.0 days
  • Top authors: japh (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active / 20,345 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼300.59ms] Passed 4 tests

Server-side resources used by ThemeForest-Check
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.83 ▼37.40
Dashboard /wp-admin3.41 ▲0.0138.63 ▲5.80
Posts /wp-admin/edit.php3.65 ▲0.0142.84 ▼0.12
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.76 ▼1,169.94
Media Library /wp-admin/upload.php3.30 ▲0.0128.62 ▲5.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ThemeForest-Check
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.66 ▲0.796.24 ▲0.342.75 ▲0.70
Dashboard /wp-admin2,895 ▲386.13 ▼0.03113.53 ▼10.25155.68 ▼6.95
Posts /wp-admin/edit.php2,694 ▼03.24 ▼0.0163.27 ▼0.51148.25 ▲5.69
Add New Post /wp-admin/post-new.php1,661 ▼020.80 ▲4.62415.10 ▼12.94208.06 ▲5.96
Media Library /wp-admin/upload.php1,701 ▲65.50 ▼0.03141.33 ▲2.09189.06 ▼56.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/themeforest-check/checks/filenames.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/themeforest-check/checks/malware.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/themeforest-check/checks/admin_menu.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/themeforest-check/checks/badthings.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/themeforest-check/checks/customs.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

themeforest-check/themeforest-check.php 85% from 13 tests

The main PHP script in "ThemeForest-Check" version 1.0.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 155 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected266 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP881118254
JavaScript1509
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.67
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/themeforest-logo-mini.png1.51KB1.22KB▼ 19.63%