83% anytheme-lock-theme

Code Review | Anytheme Lock Theme

WordPress plugin Anytheme Lock Theme scored 83% from 54 tests.

About plugin

  • Plugin page: anytheme-lock-theme
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 6, 2011
  • Latest release: Mar 18, 2013
  • Number of updates: 48
  • Update frequency: every 14.8 days
  • Top authors: olarmarius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,392 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.31MB] [CPU: ▼11.39ms] Passed 4 tests

An overview of server-side resources used by Anytheme Lock Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6918.95 ▼22.01
Dashboard /wp-admin3.21 ▼0.0944.44 ▼6.78
Posts /wp-admin/edit.php3.22 ▼0.1450.88 ▲1.03
Add New Post /wp-admin/post-new.php5.57 ▼0.3279.61 ▼14.75
Media Library /wp-admin/upload.php3.14 ▼0.0934.96 ▼2.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Anytheme Lock Theme: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,420 ▼31513.23 ▼0.950.52 ▼1.350.26 ▼49.91
Dashboard /wp-admin2,190 ▲414.88 ▼0.7797.93 ▼0.8039.25 ▲1.76
Posts /wp-admin/edit.php2,005 ▼842.05 ▲0.0239.12 ▲1.9833.53 ▼2.87
Add New Post /wp-admin/post-new.php4,428 ▲2,89520.02 ▼3.33765.89 ▲80.4254.82 ▼18.44
Media Library /wp-admin/upload.php1,372 ▼164.32 ▲0.1494.72 ▼12.3643.24 ▼0.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anytheme-lock-theme/anytheme-lock-theme.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (The theme before I activate some theme.), #2 (The theme after I activate another theme. Obvious the look is not change.)
The official readme.txt is a good inspiration

anytheme-lock-theme/anytheme-lock-theme.php 92% from 13 tests

"Anytheme Lock Theme" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 332 characters long)

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 plugin26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172026

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.67MB with 0.39MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png345.50KB145.32KB▼ 57.94%
screenshot-1.png345.50KB145.32KB▼ 57.94%