84% compact-view-mode

Code Review | Compact View Mode

WordPress plugin Compact View Mode scored 84% from 54 tests.

About plugin

  • Plugin page: compact-view-mode
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Dec 23, 2016
  • Number of updates: 16
  • Update frequency: every 44.8 days
  • Top authors: fjarrett (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active / 3,310 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.03MB] [CPU: ▼2.50ms] Passed 4 tests

This is a short check of server-side resources used by Compact View Mode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.55 ▼5.89
Dashboard /wp-admin3.33 ▲0.0345.78 ▼5.94
Posts /wp-admin/edit.php3.38 ▲0.0348.32 ▲0.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.37 ▲2.95
Media Library /wp-admin/upload.php3.25 ▲0.0334.08 ▲1.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Compact View Mode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼0.951.68 ▼0.1139.71 ▼8.43
Dashboard /wp-admin2,206 ▲184.90 ▲0.06101.17 ▼15.3640.57 ▼7.66
Posts /wp-admin/edit.php2,101 ▲152.06 ▲0.0740.02 ▲4.5634.90 ▲1.09
Add New Post /wp-admin/post-new.php1,533 ▲1923.36 ▲5.84661.31 ▼15.6456.48 ▼11.34
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.0696.31 ▼0.2540.59 ▼0.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/compact-view-mode/compact-view-mode.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: posts, admin

compact-view-mode/compact-view-mode.php Passed 13 tests

The main file in "Compact View Mode" v. 0.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
Adds a Compact View mode to the screen options when viewing posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin237 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS216094
PHP1717492
JavaScript335551

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin