84% word-switcher

Code Review | Word Switcher

WordPress plugin Word Switcher scored 84% from 54 tests.

About plugin

  • Plugin page: word-switcher
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2017
  • Latest release: Dec 21, 2017
  • Number of updates: 6
  • Update frequency: every 2.0 days
  • Top authors: bilalakil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.36ms] Passed 4 tests

Analyzing server-side resources used by Word Switcher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0623.51 ▼17.50
Dashboard /wp-admin3.32 ▲0.0149.53 ▲2.46
Posts /wp-admin/edit.php3.37 ▲0.0147.55 ▼3.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.74 ▼6.54
Media Library /wp-admin/upload.php3.24 ▲0.0137.78 ▲4.08

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Word Switcher: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.47 ▼0.342.04 ▲0.2542.38 ▲1.16
Dashboard /wp-admin2,209 ▲184.87 ▼0.21107.51 ▲2.5741.60 ▼1.48
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0236.85 ▼3.9330.60 ▼2.91
Add New Post /wp-admin/post-new.php1,519 ▼1423.16 ▲0.35611.93 ▼5.1660.39 ▲9.76
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.07100.81 ▼2.6943.20 ▼1.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/word-switcher/word-switcher.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: word-switcher, shortcode, transition, animation, effects...

word-switcher/word-switcher.php 92% from 13 tests

The main PHP script in "Word Switcher" version 0.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 177 characters long)

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
Good job! No executable or dangerous file extensions detected216 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2393143
PHP2166473

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin