84% cameleon

Code Review | Cameleon

WordPress plugin Cameleon scored84%from 54 tests.

About plugin

  • Plugin page: cameleon
  • Plugin version: 1.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2015
  • Latest release: Mar 13, 2015
  • Number of updates: 14
  • Update frequency: every 0.6 days
  • Top authors: samueljmello (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,142 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.46ms] Passed 4 tests

A check of server-side resources used by Cameleon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1343.65 ▼10.64
Dashboard /wp-admin3.43 ▲0.1353.96 ▲2.39
Posts /wp-admin/edit.php3.55 ▲0.1953.21 ▲5.62
Add New Post /wp-admin/post-new.php6.02 ▲0.1394.73 ▲3.31
Media Library /wp-admin/upload.php3.36 ▲0.1236.32 ▲3.09
Skins /wp-admin/edit.php?post_type=skin3.4037.20
Add New /wp-admin/post-new.php?post_type=skin3.4252.97

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Cameleon: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.69 ▲0.401.58 ▼0.5040.07 ▼5.17
Dashboard /wp-admin2,225 ▲485.57 ▲0.0483.87 ▼16.5937.49 ▼4.10
Posts /wp-admin/edit.php2,124 ▲272.02 ▲0.0739.00 ▲4.1635.84 ▲0.13
Add New Post /wp-admin/post-new.php1,554 ▲2822.94 ▲0.03664.54 ▼51.8068.96 ▲9.57
Media Library /wp-admin/upload.php1,427 ▲334.21 ▲0.0198.66 ▼18.9442.71 ▼6.10
Skins /wp-admin/edit.php?post_type=skin1,0911.9631.9229.82
Add New /wp-admin/post-new.php?post_type=skin1,5792.6052.2948.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cameleon/cameleon.php:25

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: plugin, themes, admin

cameleon/cameleon.php Passed 13 tests

The principal PHP file in "Cameleon" v. 1.6.0 is loaded by WordPress automatically on each request
61 characters long description:
Virtual Microsite Creator & Multi-Theme Enabler for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin626 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2179447535
JavaScript114468
CSS15023

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity103.00
▷ Minimum class complexity103.00
▷ Maximum class complexity103.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods32
▷ Static methods00.00%
▷ Public methods1959.38%
▷ Protected methods00.00%
▷ Private methods1340.62%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin